Issue Type: Bug Bug
Assignee: Ceki Gulcu
Created: 10/Jan/14 5:08 PM
Description:

Let a bundle embed cal10n-api-0.8.1.jar.

Let another bundle declare an enum annotated like this
@BaseName(value="messages")
@LocaleData(
defaultCharset = "UTF-8",
value =

{ @Locale("es"), @Locale("en") }

)

Maven compilation works fine. It detects missing messages_es.properties, messages_en.properties files. It even detects empty bundles.

But when resolving a message the following exception gets thrown.

Caused by: ch.qos.cal10n.MessageConveyorException: Missing @BaseName annotation in enum type [com.bbva.elara.instrumentation.bundle.Messages]. See also http://cal10n.qos.ch/codes.html#missingBaseNameAnnotation

It looks like the expression
BaseName rbnAnnotation = enumClass.getAnnotation(BaseName.class);
from the AnnotationExtractorViaEnumClass is evaluating to null. If this is the case It might be caused by the fact that the BaseName class is loaded by the classloader of bundle A while the enumClass (which is the declaring class) is loaded by bundle's B classloader.

Environment:

Version 0.8.1

Project: CAL10N
Labels: osgi messageconveyorexception
Priority: Major Major
Reporter: Roberto Juarez
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira