This problem is duplicate to similar problems in Jetty, but I could not find literature about Websphere
- https://github.com/eclipse/jetty.project/issues/1797
- Error scanning entry "module-info.class" when starting Jetty server
I have a Websphere 8.5.5.7 running over Java 7. Only today we discovered that upgrading log4j from 2.7 to 2.10 breaks the startup. Following is one of the many stack traces:
[01/03/18 10.12.14:154 CET] 000003d9 ecs W com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl scanJAR unable to open input stream for resource module-info.class in archive WEB-INF/lib/log4j-api-2.10.0.jar
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.ecs.internal.scan.impl.ClassScanner.scanInputStream(ClassScanner.java:147)
at com.ibm.ws.ecs.internal.scan.impl.ClassScanner.scanInputStream(ClassScanner.java:124)
at com.ibm.ws.ecs.internal.scan.impl.ClassScanner.scanInputStream(ClassScanner.java:120)
at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.scanJAR(ScannerContextImpl.java:275)
at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.scanJARs(ScannerContextImpl.java:315)
at com.ibm.ws.ecs.internal.scan.context.impl.WARScannerContext.scanInternal(WARScannerContext.java:76)
at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.scan(ScannerContextImpl.java:87)
at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.getScannedClasses(ScannerContextImpl.java:70)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.scanForHandlesTypesClasses(WebAppImpl.java:760)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:601)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:406)
Basically the log4j developers had the great (but unlucky) idea of using multi-release jars for Java 9 to accommodate older Java runtimes.
Our installation cannot be upgraded. Those are the versions and we must keep them. I have tried to google around for multirelease jars with websphere but there seems to be no literature.
I would like to ask if there is any configuration workaround to disable massive scanning of jars at least in selected packages in the targeted version of websphere.