junit.framework.AssertionFailedError

Exception in constructor: testQualifyRest (java.lang.RuntimeException: org.apache.cxf.bus.extension.ExtensionException: Could not create object of extension class org.apache.cxf.transport.http.netty.server.NettyHttpTransportFactory.

Samebug tips9

You need to add httpcore to your dependencies. Try adding version 4.3 or further.


rafaelrafael

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web17798

  • via Unknown by Chris Marshall (JIRA),
  • via Unknown by Sergey Beryozkin (JIRA),
  • via Unknown by Chris Marshall,
  • Stack trace

    • junit.framework.AssertionFailedError: Exception in constructor: testQualifyRest (java.lang.RuntimeException: org.apache.cxf.bus.extension.ExtensionException: Could not create object of extension class org.apache.cxf.transport.http.netty.server.NettyHttpTransportFactory. at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWithValues(JAXRSClientFactoryBean.java:341) at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.create(JAXRSClientFactoryBean.java:264) at com.a100sys.utils.JacksonClientHelper.createJacksonJSONService(JacksonClientHelper.java:429) at com.a100sys.utils.QuestionMapper.getQuestionService(QuestionMapper.java:339) at com.a100sys.utils.QuestionMapper.findQuestionOptions(QuestionMapper.java:279) at com.a100sys.utils.QuestionMapper.<init>(QuestionMapper.java:247) at com.a100sys.utils.QuestionMapper.getInstance(QuestionMapper.java:269) at com.a100sys.affiliateportal.TestQualify.<init>(TestQualify.java:37) at com.a100sys.affiliateportal.rest.TestQualifyRestJSON.<init>(TestQualifyRestJSON.java:14) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at junit.framework.TestSuite.createTest(TestSuite.java:63) at junit.framework.TestSuite.addTestMethod(TestSuite.java:310) at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:153) at junit.framework.TestSuite.<init>(TestSuite.java:132) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:102) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.apache.cxf.bus.extension.ExtensionException: Could not create object of extension class org.apache.cxf.transport.http.netty.server.NettyHttpTransportFactory. at org.apache.cxf.bus.extension.Extension.load(Extension.java:260) at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:213) at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadBeansOfType(ExtensionManagerImpl.java:368) at org.apache.cxf.transport.TransportFinder.loadAll(TransportFinder.java:138) at org.apache.cxf.transport.TransportFinder.findTransportForURI(TransportFinder.java:84) at org.apache.cxf.bus.managers.DestinationFactoryManagerImpl.getDestinationFactoryForUri(DestinationFactoryManagerImpl.java:128) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpointInfo(AbstractJAXRSFactoryBean.java:131) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpoint(AbstractJAXRSFactoryBean.java:219) at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWithValues(JAXRSClientFactoryBean.java:291) ... 22 more Caused by: java.lang.NoClassDefFoundError: io
    • etty/util/Version at org.apache.cxf.transport.http.netty.server.NettyHttpDestinationFactory.<init>(NettyHttpDestinationFactory.java:36) at org.apache.cxf.transport.http.netty.server.NettyHttpTransportFactory.<init>(NettyHttpTransportFactory.java:55) at org.apache.cxf.transport.http.netty.server.NettyHttpTransportFactory.<init>(NettyHttpTransportFactory.java:58) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at org.apache.cxf.bus.extension.Extension.load(Extension.java:249) ... 30 more Caused by: java.lang.ClassNotFoundException: io.netty.util.Version at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 38 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    rprp
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    musketyrmusketyr
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    2363 more bugmates