5 Replies Latest reply on Jan 25, 2003 9:14 PM by ben2

    Errors while accessing JSP

    andrzejr

      Hi!

      09:42:23,246 WARN [jbossweb] WARNING: 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)
      at org.apache.jsp.index$jsp._jspService(index$jsp.java:46)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:293)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:581)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1687)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1637)
      at org.mortbay.http.HttpServer.service(HttpServer.java:875)
      at org.jboss.jetty.Jetty.service(Jetty.java:543)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:806)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:956)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:823)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:203)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
      at java.lang.Thread.run(Thread.java:536)

      09:42:23,270 INFO [jbossweb] JspFactoryImpl: Exception initializing page context: java.lang.LinkageError: loader constraints violated when linking javax/servlet/jsp/JspWriter class

      got this when trying to access this:

      <%@ page import="java.util.*" %>



      Welcome


      Welcome
      Time now: <%= new java.util.Date() %>
      <%= new java.math.BigDecimal("000001") %>



      jboss 3.0.4/jetty sun's jdk 1.4.1

        • 1. Re: Errors while accessing JSP

          please mail me a small test JSP page and I 'll take a look at it.


          Jules

          • 2. Re: Errors while accessing JSP
            andrzejr

            it is included in my previous post, at the end of message

            • 3. Re: Errors while accessing JSP
              mescalito

              I've got this issue when specifying:
              <jboss-app>
              <loader-repository>my.app.domain.com:loader=myear.ear</loader-repository>
              </jboss-app>

              When I try to access JSPs for the first time, I have:

              11:54:27,781 WARN [ClassLoadingTask] Duplicate class found: javax.servlet.jsp.JspWriter
              Current CS: (file:/D:/tools/jboss-3.0.4_tomcat-4.1.12/server/default/tmp/deploy/tomcat-4.1.x/common/lib/servlet.jar/85.servlet.jar <no certificates>)
              Duplicate CS: (file:/D:/tools/jboss-3.0.4_tomcat-4.1.12/server/default/tmp/deploy/server/default/lib/javax.servlet.jar/11.javax.servlet.jar <no certificates>)

              I resolved this problem by removing javax.servlet.jar from server/default/lib (and it looks a bit weird).

              I presume any _WEB_ application with separate classloading would have such problem.

              • 4. Re: Errors while accessing JSP
                ben2

                I am having the same problem and I am specifying the jboss-app.xml. It appears that this only happens when I first start the server. If I 'touch' my EAR then the problem goes away, but it would be nice if I did not have to do that every time I started my server.

                <jboss-app>
                <loader-repository>my.app.domain.com:loader=myear.ear</loader-repository>
                </jboss-app>

                • 5. Re: Errors while accessing JSP
                  ben2

                  It appears that if I remove the JBOSS_HOME/server/default/lib/javax.servlet.jar, such that the JBOSS_HOME/tomcat-4.1.x/common/lib/servlet.jar is the only one loaded then this problem goes away. I have not tested this under Jetty yet.