Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
Version 0.8.1
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 =
)
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.