Topic
2 replies Latest Post - ‏2013-10-22T17:47:02Z by Herman0101
smandl
smandl
1 Post
ACCEPTED ANSWER

Pinned topic NoClassDefFoundError when jaxrs-1.1 feature enabled

‏2013-05-08T20:15:35Z |

I have an eclipse project named wsdev with some jaxrs services. I have a Liberty Server 8.5.0.2 installed and the wasdev developer tools for eclipse. In the root of WebContent in the wsdev project is a test.html that just basically says hello. The wsdev application context root is /. If I browse to http://localhost:9080/test.html I get the expected response - all is working as it should. Then when I enable the jaxrs-1.1 feature in the server configuration, I get the following response in the browser:

404 

Not Found

CWWKT0018E: The application or context root for this request has not been found: /test.html

this is the console output when this happens:

 

[ERROR   ] SRVE0015E: Failure to initialize Web application wsdev
java.lang.NoClassDefFoundError: org/apache/http/HttpException
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.ibm.ws.webcontainer.osgi.webapp.WebApp.addClassToHandlesTypesStartupSet(WebApp.java:1084)
  at com.ibm.ws.webcontainer.osgi.webapp.WebApp.scanForHandlesTypesClasses(WebApp.java:959)
  at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:2202)
  at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:870)
  at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:5917)
  at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:249)
  at [internal classes]

I created another dynamic web project in the same workspace called Hello and set the application context root to Hello, configured the server to this application and it works fine, even when jaxrs-1.1 is enabled in the server.xml. I can even create a jaxrs web service in the Hello project and it works fine. 

Any ideas what is wrong with my first project that it doesn't like jaxrs?

  • AlexMulholland
    AlexMulholland
    32 Posts
    ACCEPTED ANSWER

    Re: NoClassDefFoundError when jaxrs-1.1 feature enabled

    ‏2013-05-09T19:03:29Z  in response to smandl

    Hi,

    Are you packaging org/apache/http/HttpException in your application?  That is not an API package in the liberty server.

    Regards, Alex.

    • Herman0101
      Herman0101
      1 Post
      ACCEPTED ANSWER

      Re: NoClassDefFoundError when jaxrs-1.1 feature enabled

      ‏2013-10-22T17:47:02Z  in response to AlexMulholland

      I am getting the same error message when i try to start BigInsights WebConsole.

      I downloaded the VMware single node image of BigInsights QuickStart edition and ran it with VMware player.

      I ran the "start big insights services" in the bottom left and it did its thing then i ran BigInsights WebConsole and that's where the error message pops up in FireFox.

      H