Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-4278

RuntimeException: Provider for jakarta.activation.spi.MailcapRegistryProvider cannot be found from UDPTransportTest

XMLWordPrintable

      jakarta.activation-api-2.1.0 has FactoryFinder to load the implementation class. 

      If there is no impl under classpath, it throws the following exception : 

       

      [INFO] Running org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest
      May 05, 2022 12:21:24 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
      INFO: Creating Service {http://apache.org/hello_world/services}SOAPService from class org.jboss.wsf.stack.cxf.addons.transports.udp.Greeter
      May 05, 2022 12:21:25 PM org.apache.cxf.endpoint.ServerImpl initDestination
      INFO: Setting the server's publish address to be udp://:9434
      May 05, 2022 12:21:25 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
      INFO: Creating Service {http://udp.transports.addons.cxf.stack.wsf.jboss.org/}GreeterService from class org.jboss.wsf.stack.cxf.addons.transports.udp.Greeter
      java.lang.ExceptionInInitializerError
          at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:66)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
          at com.sun.proxy.$Proxy43.greetMe(Unknown Source)
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testSimpleUDP(UDPTransportTest.java:77)
          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:50)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
          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:363)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
          at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      Caused by: java.lang.RuntimeException: Provider for jakarta.activation.spi.MailcapRegistryProvider cannot be found
          at jakarta.activation.FactoryFinder.find(FactoryFinder.java:90)
          at jakarta.activation.MailcapCommandMap.getImplementation(MailcapCommandMap.java:696)
          at jakarta.activation.MailcapCommandMap.loadFile(MailcapCommandMap.java:284)
          at jakarta.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:154)
          at jakarta.activation.CommandMap.getDefaultCommandMap(CommandMap.java:60)
          at org.apache.cxf.attachment.AttachmentUtil.<clinit>(AttachmentUtil.java:77)
          ... 37 more
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.attachment.AttachmentUtil
          at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:66)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
          at com.sun.proxy.$Proxy43.greetMe(Unknown Source)
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testSimpleUDP(UDPTransportTest.java:77)
          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:50)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
          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:363)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
          at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.attachment.AttachmentUtil
          at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:66)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
          at com.sun.proxy.$Proxy43.greetMe(Unknown Source)
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testSimpleUDP(UDPTransportTest.java:77)
          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:50)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
          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:363)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
          at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.attachment.AttachmentUtil
          at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:66)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
          at com.sun.proxy.$Proxy43.greetMe(Unknown Source)
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testSimpleUDP(UDPTransportTest.java:77)
          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:50)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
          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:363)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
          at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.attachment.AttachmentUtil
          at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:66)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
          at com.sun.proxy.$Proxy43.greetMe(Unknown Source)
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testSimpleUDP(UDPTransportTest.java:77)
          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:50)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
          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:363)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
          at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      May 05, 2022 12:21:25 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
      INFO: Creating Service {http://udp.transports.addons.cxf.stack.wsf.jboss.org/}GreeterService from class org.jboss.wsf.stack.cxf.addons.transports.udp.Greeter
      May 05, 2022 12:21:25 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
      INFO: Creating Service {http://udp.transports.addons.cxf.stack.wsf.jboss.org/}GreeterService from class org.jboss.wsf.stack.cxf.addons.transports.udp.Greeter
      [ERROR] Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.041 s <<< FAILURE! - in org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest
      [ERROR] testLargeRequest(org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest)  Time elapsed: 0.017 s  <<< ERROR!
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.attachment.AttachmentUtil
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testLargeRequest(UDPTransportTest.java:125)
      [ERROR] testBroadcastUDP(org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest)  Time elapsed: 0.01 s  <<< ERROR!
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.attachment.AttachmentUtil
          at org.jboss.wsf.stack.cxf.addons.transports.udp.UDPTransportTest.testBroadcastUDP(UDPTransportTest.java:110)
      [INFO]
      [INFO] Results:
      [INFO]
      [ERROR] Errors:
      [ERROR]   UDPTransportTest.testBroadcastUDP:110 » NoClassDefFound Could not initialize c...
      [ERROR]   UDPTransportTest.testLargeRequest:125 » NoClassDefFound Could not initialize c...
      [INFO]
      [ERROR] Tests run: 3, Failures: 0, Errors: 2, Skipped: 0
       
      

       

      If it uses the activation api from com.sun.activation:jakarta.activation, it won't go into FactoryFinder to load implementation class. 

      We need to figure out why this isn't a problem for cxf. 

       

              rhn-engineering-ema Jim Ma
              rhn-engineering-ema Jim Ma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: