facebook

javax.servlet.ServletException (MyEclipse Blue/Tomcat)

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #323110 Reply

    Mikael Plate
    Member

    After making a change to an object reference from one type to another, Tomcat began throwing an error message about the following:

    javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/jasper/servlet/JasperLoader) previously initiated loading for a different type with name “javax/servlet/http/HttpServletRequest”
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

    After making the change back to the original object reference, and re-deploying to Tomcate embedded with MyEclipse Blue IDE, the error is still being thrown.

    We’re not sure why this error is occurring, but we tried it on another instance of MyEclipse Blue/Embedded Tomcat, and the issue re-occurs with the change, and back to the origninal code.

    #323118 Reply

    support-tony
    Keymaster

    Rob,

    Sorry you’re seeing this issue.

    I’m afraid it’s not a lot of information to go on. Could you please provide more details about the change you made, perhaps including the line of code, with an indication of the context. We need as much information as possible to help replicate the problem here. Best of all would be a simple project that shows the problem.

    Also, please provide information about your environment – this is best done by attaching the information shown in MyEclipse->Installation Summary->Installation Details.

    Have you tried this on an external Tomcat or tried deploying outside of MyEclipse? Did you make the changes with a running Tomcat, or did you restart Tomcat after each change?

    #323119 Reply

    support-tony
    Keymaster

    I see we’ve received the project that is causing the problem. Thanks for that but we’ll need the other information I asked for, including the code change you made.

    #323128 Reply

    support-tony
    Keymaster

    Rob,

    I replicated the problem and managed to fix the problem here, so probably no need for that other information I asked for. I found that the WebSphere 7.0 Web Services Client Libraries (JAX-WS) was in the build path for the project and that library includes a version of the javax.servlet.http.HttpServletRequest class. When I removed the library, the application started fine, though I’m not sure if your application needs other classes in the library.

    I guess the class was loaded in one way and another class loader was trying to load it from a different source, but I didn’t investigate in detail.

    How was the build path constructed? Was it purely using MyEclipse functions? I’m not sure why a WebSphere library is there if you are targeting Tomcat, so that would be something to investigate. Why this error occurred after a code change, but not before, is not clear, so perhaps providing some of the requested information may help in answering this question.

    Please let us know if this helps.

    Some extra information, which may or may not be of interest. I didn’t know which system you are developing on, so I tried Linux, my normal system. I got a number of validation errors in WSDL files. This was because one of the folders in a path to xsd files was sometimes referred to as “ibm” and sometimes “IBM”. On Linux, these are two different paths but Windows is not case sensitive. So I guess you are on Windows.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: javax.servlet.ServletException (MyEclipse Blue/Tomcat)

You must be logged in to post in the forum log in