I have build my application and deployed in WAS 6.1. I am able to see my jar files in WEB-INF/lib and in war files, While running application My WAS not identify JSON jar file. getting No Class def found error. Please find attached logs file.

java.lang.NoClassDefFoundError: org.apache.commons.lang.exception.NestableRuntimeException at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:258) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at java.net.URLClassLoader.defineClass(URLClassLoader.java:589) at java.net.URLClassLoader.access$400(URLClassLoader.java:123) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034) at java.security.AccessController.doPrivileged(AccessController.java:279) at java.net.URLClassLoader.findClass(URLClassLoader.java:491) at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:132) at java.lang.ClassLoader.loadClass(ClassLoader.java:631) at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:597) at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:69) at java.lang.J9VMInternals.initialize(J9VMInternals.java:131) at com.nationwide.websheets.web.util.JSONUtils.marshallToJSONWithDateProcessor(JSONUtils.java:113)

I tried 1) I placed my jar file in server/lib still it doesn't help me. I wondered why its not identify my jar file if its in server/lib or server/lib/ext. 2) Created shared lib in WAS. It doesn't help me. 3) Set class path in system variable, It doesn't help me.

any help on this? thanks for the help.

Thanks CVSR Sarma.

有帮助吗?

解决方案 2

I found the issue.

This is issue because of WAS6.1, I have installed WAS6.1.0.23 Fix packs. It worked.

Its not dependency issue.

其他提示

1) Your error indicates the problem is with your commons-lang jar (not JSON.jar per se)

2) Make sure it's in your WEB-INF/lib

3) There might also be a version/cross dependency issue. Look at the "Project transitive dependencies" table here:

I have same issue. I have installed WAS 6.1.0.23 it worked. This fix pack for For

Web Services Feature Pack and EJB 3.0 Feature Pack users:

Web Services Feature Pack and EJB 3.0 Feature Pack Fix Pack 23 are available as separate PAK files for Web Services Feature Pack and EJB 3.0 Feature Pack users.

I dont know how it worked for JSON.jar issue.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top