2 Replies Latest reply on Nov 9, 2004 12:51 AM by mysorevish

    Classloader problem in JBoss 3.2.3 with Jetty

    tsangcn Newbie


      my application works well in JBoss 3.2.1 (with Jetty).

      But when I upgrade to JBoss 3.2.3 (with jboss-3.2.2-jetty-4.2.14.sar), I
      always get (in my JSP) the following exception

      javax.servlet.ServletException
      at
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:531)
      ......
      getRootCause():
      java.lang.ClassCastException
      at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:109)
      ......

      After I restart JBoss (without delete the generated stuff from the
      previous step), I got the following exception

      java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/BodyContent
      ......



      Then I delete all the generated stuffs, and replace
      jboss-3.2.2-jetty-4.2.14.sar with jboss-3.2-jetty-4.2.17.sar, I got the
      following exception

      JspFactoryImpl: Exception initializing page context
      java.lang.LinkageError: loader constraints violated when linking
      javax/servlet/jsp/JspWriter class
      at
      org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:170)
      at
      org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:154)
      ......


      After I restart JBoss (without deleteing the generated stuffs), I got
      the following exception

      javax.servlet.ServletException: loader constraints violated when linking
      javax/servlet/jsp/tagext/Tag class
      at
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)

      But sometimes, I got the following exception in first start of JBoss

      javax.servlet.ServletException
      at
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:531)
      ......
      getRootCause():
      java.lang.ClassCastException
      at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:109)
      at
      ......


      So, I need help. It seems that it always failed in customized tag with
      the following exceptions

      - java.lang.ClassCastException in TagHandlerPool

      - java.lang.LinkageError: loader constraints violated when linking
      javax/servlet/jsp/tagext/Tag class

      - java.lang.LinkageError: loader constraints violated when linking
      javax/servlet/jsp/JspWriter class

      - java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/BodyContent

      Since the messages are so strange so I think that the problem is related to classloader.
      Can anyone help to solve the problem?