0 Replies Latest reply on May 9, 2005 2:30 PM by demboos

    Javaasist in web application deployed under Sun App server

    demboos

      Hello

      I am an indirect user of Javaasist since I am using Tapestry web framework. I'm having serious troubles deploying my web apps based on tapestry under Sun Java System Application Server 8 release 2005.Q1.

      At first I thought it would be Tapestry issue, but then I wrote simple bare http servlet which contained the following code in processRequest method:

      ...
      javassist.ClassPool classPool = new javassist.ClassPool(null);
      ...

      Naturally the WAR I deploy contains javaasist.jar.

      Then after trying to run the servlet I get the following error:
      exception:"
      javax.servlet.ServletException
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:300)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)

      root cause

      java.lang.NoClassDefFoundError
      SampleServlet1.processRequest(SampleServlet1.java:41)
      SampleServlet1.doGet(SampleServlet1.java:60)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
      sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:324)
      org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
      java.security.AccessController.doPrivileged(Native Method)
      javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
      "

      SampleServlet1.java:41 points exactly at the line I wrote earlier.

      So (finally) my question is: may this issue be related to Javaasist or rather to Sun App Server class loading problem? I'd like to clarify that I had no such problems under Jboss App server, tomcat or weblogic.

      I'm running Windows XP and jdk 1.4.2_03

      Thanks in advance

      --
      Demboos