0 Replies Latest reply: Jan 7, 2013 9:12 PM by YE RSS

    path and classpath

      I have a basic question about weblogic 12c classloader.
      I install weblogic 12c to windows 7 (64) and deploy a web application with cxf 2.4, spring+hibernate+struts. It works fine. Then, I set some environment variables includes ant, maven, and cxf to path, classpath, and set their home value.

      Then, the web application does not work. It shows errors as follow:

      1, In weblogic console if I deploy the application from a folder, errors are : java.lang.ClassCastException: weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl cannot be cast to weblogic.j2ee.descriptor.wl.WeblogicWebAppBean
      2, After deploying as a war, the output window shows:
      Compilation of JSP File '/BZWeb/index1.jsp' failed:

      index1.jsp:2:18: The include file was not found.
      <%@ include file="/common/taglibs.jsp"%>
      index1.jsp:2:18: The include file was not found.
      <%@ include file="/common/taglibs.jsp"%>
      index1.jsp:7:22: The include file was not found.
      <%@ include file="/common/meta.jsp"%>

      3, during deployment, errors are :

      Error is: "java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMai
      java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
      at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
      Truncated. see log file for complete stacktrace
      Caused By: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain

      I add weblogic-application.xml to this webapplication, but it still does not work.

      After I remove ant, maven, cxf contents in path, classpath, remove their home variables, remote weblogic-application.xml, the web application works fine again.

      How weblogic 12c loades different jars?