Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7435

Java 11: ClassNotFoundException: org.apache.geronimo.osgi.locator.ProviderLocator from WS Tests

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Running the EJBCA WS Tests on Wildfly 14 with OpenJDK 11 fails with:

      java.lang.NoClassDefFoundError: org/apache/geronimo/osgi/locator/ProviderLocator
      at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:176)
      at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
      at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
      at javax.xml.ws.spi.Provider.provider(Provider.java:43)
      at javax.xml.ws.Service.<init>(Service.java:35)
      at org.ejbca.core.protocol.ws.client.gen.EjbcaWSService.<init>(EjbcaWSService.java:58)
      at org.ejbca.core.protocol.ws.CommonEjbcaWS.createEjbcaWSPort(CommonEjbcaWS.java:334)
      at org.ejbca.core.protocol.ws.CommonEjbcaWS.adminSetUpAdmin(CommonEjbcaWS.java:329)
      at org.ejbca.core.protocol.ws.EjbcaWSTest.setUpAdmin(EjbcaWSTest.java:259)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
      at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:534)
      at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1196)
      at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1041)
      Caused by: java.lang.ClassNotFoundException: org.apache.geronimo.osgi.locator.ProviderLocator
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 33 more 
       

      The class org.apache.geronimo.osgi.locator.ProviderLocator }} is present twice in our current trunk as {{lib/ext/geronimo-osgi-locator-1.1.jar and lib/ext/resteasy-jaxrs-lib/geronimo-osgi-locator-1.1.jar, but is not part of dist/ejbca.ear.

      Could it be that we bundle lib/resteasy-jackson2-provider-3.0.1.Final.jar in ejbca.ear?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              johan Johan Eklund
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified