2 Replies Latest reply: May 3, 2013 3:33 AM by kumar_1302 RSS

    Getting NoClassDefFoundError exception in weblogic

    kumar_1302
      I have developed a web application in Tomcat earlier and I had some jar files in my tomcat/lib directory. Now I am trying to run my application on weblogic server so I have installed weblogic 10.3.6, created a weblogic domain and deployed my application. I copied my jar files which I placed earlier in tomcat/lib to below lib directory:

      Middleware/user_projects/domains/test_domain/lib/

      I believe lib directory should be in class-path but when I access the class file in my web application I am getting below error:

      Caused by: java.lang.NoClassDefFoundError: com/test/SampleFile
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
      at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101)
      at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
      at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:171)