tomcat - NoClassDefFoundError exception in weblogic -
i have developed web application in tomcat earlier , had jar files in tomcat/lib
directory. trying run application on weblogic server have installed weblogic 10.3.6, created weblogic domain , deployed application. copied jar files placed earlier in tomcat/lib
below lib directory:
middleware/user_projects/domains/my_domain/lib/
i believe lib directory should in class-path when access class file in web application getting below error:
caused by: java.lang.noclassdeffounderror: com/sample/testmanager @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclasscond(classloader.java:631) @ java.lang.classloader.defineclass(classloader.java:615) @ java.security.secureclassloader.defineclass(secureclassloader.java:141) @ java.net.urlclassloader.defineclass(urlclassloader.java:283) @ java.net.urlclassloader.access$000(urlclassloader.java:58) @ java.net.urlclassloader$1.run(urlclassloader.java:197) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ java.lang.classloader.loadclass(classloader.java:295) @ java.lang.classloader.loadclass(classloader.java:247) @ weblogic.utils.classloaders.genericclassloader.loadclass(genericclassloader.java:179) @ weblogic.utils.classloaders.filteringclassloader.findclass(filteringclassloader.java:101) @ weblogic.utils.classloaders.filteringclassloader.loadclass(filteringclassloader.java:86) @ java.lang.classloader.loadclass(classloader.java:295) @ java.lang.classloader.loadclass(classloader.java:295) @ java.lang.classloader.loadclass(classloader.java:247) @ weblogic.utils.classloaders.genericclassloader.loadclass(genericclassloader.java:179) @ weblogic.utils.classloaders.changeawareclassloader.loadclass(changeawareclassloader.java:43) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:171)
i wanted ask clarification new , stackoverflow not allowing me ask clarification. hence posting answer
when place in domain_home/lib, remember jars in not appended system/server classpath. classloader gets created child of system/server classloader.
so, classes in jars in domain_home/lib directory visible applications, such wars, ears, etc.
consider this:
- if war/ear class package1.a
- if system/server classpath has jar file contains package2.b
- if domain_home/lib has jar file contains package3.c
and if refer:
a) package2.b package1.a
b) package3.c package2.b
then "a" pass "b" fail similar error getting.
Comments
Post a Comment