title: Websphere hates multi-release jars
body: <p>This problem is duplicate to similar problems in Jetty, but I could not find literature about Websphere</p>
  
  <ul>
  <li><a href="https://github.com/eclipse/jetty.project/issues/1797" rel="nofollow noreferrer">https://github.com/eclipse/jetty.project/issues/1797</a></li>
  <li><a href="https://stackoverflow.com/questions/45311295/error-scanning-entry-module-info-class-when-starting-jetty-server">Error scanning entry &quot;module-info.class&quot; when starting Jetty server</a></li>
  </ul>
  
  <p>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:</p>
  
  <pre><code>[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.&lt;init&gt;(Unknown Source)
      at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.objectweb.asm.ClassReader.&lt;init&gt;(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)
  </code></pre>
  
  <p>Basically the log4j developers had the great (but unlucky) idea of using multi-release jars for Java 9 to accommodate older Java runtimes.</p>
  
  <p>Our installation <strong>cannot be upgraded</strong>. 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.</p>
  
  <p>I would like to ask <strong>if there is any configuration workaround</strong> to disable massive scanning of jars at least in selected packages in the targeted version of websphere.</p>