Skip to main content

using Jersey framework for web services

1 reply [Last post]
jfleming
Offline
Joined: 2011-01-20

I am new to building web services and have been directed to use the Jersey framework as part of the solution to my project. I am using Java 1.5 and Jersey 1.1.4.1 which is compatible. I use WebLogic 10.0 for the app server. I have coded a very simple HelloWorld test to start with. Unfortunately, at run time I receive a NoClassDefFoundError on a Jersey class file <ReflectionHelper> The .jar file containing this class is properly loaded into my deployment WEB-INF\classes folder. As for the web.xml file it only contains the servlet-class setting for the Jersey <ServletContainer> which is found but then invokes the WebComponent class to perform initialization and when that module attempts to createResourceConfig the error is received. The classpath has been checked and appears correct.
Any suggestions to resolve would be appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jfleming
Offline
Joined: 2011-01-20

The issue has now been resolved. In my attempts to trouble-shoot with different versions of Jersey, I have discovered that 1.1.5.1 seems to work best with Java 1.5 and the Weblogic 10. The error detailed above had to do with having multiple versions of the .jar files in the deployment folder. It is strange however that the simple test would not work until I exploded the class files out of the .jar files and into the WEB-INF\classes folder as opposed to just having the .jar files in the WEB_INF\lib folder. ??