Friday, May 11, 2012

How to resolve: java.lang.NoClassDefFoundError: oracle/j2ee/ws/common/jaxws/ServiceDelegateImpl

Cited below error can occur when exist problem related to runtime access to wsclient.jar library.
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/j2ee/ws/common/jaxws/ServiceDelegateImpl
    at jnditest.WorklistClient.connect(
    at jnditest.JNDITest.main(
Caused by: java.lang.ClassNotFoundException:
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    ... 3 more

The error message says "java.lang.NoClassDefFoundError: oracle/j2ee/ws/common/jaxws/ServiceDelegateImpl" which means that your application can't access this class. Also you must add appropriate jar including not found class to application classpath.

In case of ServiceDelegateImpl you should add %JDEV_HOME%\oracle_common\modules\oracle.webservices_11.1.1\wsclient.jar. If you are using JDeveloper, you can do this as shown below:

1. Click Project Properties menu item on your Project  in Project Inspector
2. Select Libraries and Classpath

3. Click Add JAR/Directory

4. Find appriopriate library and confirm selection

No comments:

Post a Comment