0

a strange thing is going on and I need you help to point me into the correct direction.

After the upgrade from WildFly15 to WildFly 24.0.1 some (not all) applications fail during deployment with the following warnings and error(s):

2021-08-12 14:33:59,148 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0003: Could not index class org/osgi/service/device/Match.class at /content/myapplication.war/WEB-INF/lib/org.eclipse.osgi.services-3.3.100.v20130513-1956.jar: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
    at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:317)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:259)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:318)
    at java.util.jar.JarVerifier.update(JarVerifier.java:230)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
    at java.util.jar.JarFile.getInputStream(JarFile.java:455)
    at org.jboss.vfs.spi.JavaZipFileSystem.openInputStream(JavaZipFileSystem.java:182)
    at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:318)
    at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:98)
    at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
    at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)

2021-08-12 14:34:01,181 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."myapplication.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapplication.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "myapplication.war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
        at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
        at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:317)
        at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:259)
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:318)
        at java.util.jar.JarVerifier.update(JarVerifier.java:230)
        at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
        at java.util.jar.JarFile.getInputStream(JarFile.java:455)
        at org.jboss.vfs.spi.JavaZipFileSystem.openInputStream(JavaZipFileSystem.java:182)
        at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:318)
        at org.jboss.vfs.VFSUtils.readManifest(VFSUtils.java:241)
        at org.jboss.vfs.VFSUtils.getManifest(VFSUtils.java:227)
        at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.getManifest(ManifestAttachmentProcessor.java:76)
        at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:65)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
        ... 8 more

WildFly has the same configuration, its on the same machine and we use the same JVM (1.8.something) to run the server.

The error is caused by one or more invalid signatures in the jars in /WEB-INF/lib

  1. Why does it appear now on the new server (wasnt WF15 validating the jars already)?
  2. How to solve?
  3. Can we remove signatures from the jars during war assemply using maven or disable signature check on WF24?

Any help/hint is highly appreciated!

Have a nice day!

NeoP5
  • 611
  • 7
  • 19
  • 1
    Do read this [post](https://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar) ? I think that such a problem has already been – devopsinka Aug 12 '21 at 13:02
  • @ArtemKiryanov Thanks for pointing me to this thread I saw it already. My Problem is that the solutions proposed seem to be related to jar-fiels only but my issue is related to a war-file. – NeoP5 Aug 12 '21 at 13:18
  • A war file is just a specialized jar file. If you have invalid signatures in `WEB-INF/lib` then it's one of the jar files contained within the war file. Does the error not tell you which jar file is bad? – stdunbar Aug 12 '21 at 23:07

0 Answers0