[slf4j-dev] SLF4J 1.8 on JVMs < 9
Ceki
ceki at qos.ch
Mon Feb 18 19:53:21 CET 2019
Hi Thorsten,
Could you please create a JIRA issue for this problem?
--
Ceki
On 18.02.2019 16:08, Thorsten Heit wrote:
> Hi,
>
> I just joined this list, so first hi from Germany ;-)
>
> When I use slf4j-1.8.0-beta2 in an application that is being deployed to
> our Websphere 9 server, I see error messages in the deployment manager
> console:
>
>
> (...)
> [2/18/19 15:51:31:862 CET] 000022bd WSModuleDescr E WSWS7011E: The
> configuration for the myapp-war-2019.4.0-SNAPSHOT.war application module
> cannot load correctly.
> The following error occurred:
> com.ibm.ws.metadata.annotations.AnnotationException: Annotation
> processing failed for class: module-info.class
> at
> com.ibm.ws.metadata.annotations.AnnotationConfigReader.getAnnotationData(AnnotationConfigReader.java:883)
>
> at
> com.ibm.ws.metadata.annotations.AnnotationConfigReader.getAnnotationDataForZippedArchive(AnnotationConfigReader.java:766)
>
> at
> com.ibm.ws.metadata.annotations.AnnotationConfigReader.getAnnotationData(AnnotationConfigReader.java:696)
>
> at
> com.ibm.ws.metadata.annotations.AnnotationConfigReader.populateModuleData(AnnotationConfigReader.java:353)
>
> at
> com.ibm.ws.metadata.MetaDataOrchestrator.getModuleData(MetaDataOrchestrator.java:112)
>
> at
> com.ibm.ws.websvcs.annotations.collector.WASAnnotationCollector.getMDO(WASAnnotationCollector.java:258)
>
> at
> com.ibm.ws.websvcs.annotations.collector.WASAnnotationCollector.collect(WASAnnotationCollector.java:146)
>
> at
> com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.getClassDataObjects(WSModuleDescriptorImpl.java:1458)
>
> at
> com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.initDBCMap(WSModuleDescriptorImpl.java:2153)
>
> at
> com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.buildJAXWSServiceRefs(WSModuleDescriptorImpl.java:1137)
>
> at
> com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl._containsWebServiceClients(WSModuleDescriptorImpl.java:639)
>
> at
> com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.containsWebServiceClients(WSModuleDescriptorImpl.java:611)
>
> at
> com.ibm.ws.websvcs.deploy.WSCacheWriter.writeModuleCache(WSCacheWriter.java:583)
>
> at
> com.ibm.ws.websvcs.deploy.WSCacheWriter.writeApplicationCache(WSCacheWriter.java:242)
>
> at
> com.ibm.ws.websvcs.deploy.WSCacheWriter.writeApplicationCache(WSCacheWriter.java:167)
>
> at
> com.ibm.ws.websvcs.deploy.PersistentStorageInstallSaveTask.performTask(PersistentStorageInstallSaveTask.java:196)
>
> at
> com.ibm.ws.management.application.sync.AppBinaryProcessor$ExpandApp.expand(AppBinaryProcessor.java:1770)
>
> at
> com.ibm.ws.management.application.sync.AppBinaryProcessor$AppBinThread.run(AppBinaryProcessor.java:1276)
>
> at java.lang.Thread.run(Thread.java:811)
> Caused by: java.lang.IllegalArgumentException
> at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> at
> com.ibm.ws.metadata.annotations.AnnotationConfigReader.getAnnotationData(AnnotationConfigReader.java:836)
>
> ... 18 more
> (...)
>
> Switching back to the older 1.7.25 version lets this error message
> disappear.
>
> The reason is that Websphere uses Java 8 which cannot parse / process
> the module-info.class that was compiled with Java 9.
>
>
> Solution for these kinds of problems:
> Move the class to META-INF/versions/9 and mark the resulting Jar as a
> multi-release. See [1] for how to do this.
>
>
> What do you think?
> I can create a pull request on Github if you like.
>
>
> Regards
>
> Thorsten
>
>
> [1]
> https://github.com/apache/maven-compiler-plugin/blob/master/src/it/multirelease-patterns/singleproject-runtime/pom.xml
>
>
> _______________________________________________
> slf4j-dev mailing list
> slf4j-dev at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-dev
>
--
--
Ceki Gülcü
More information about the slf4j-dev
mailing list