• Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat XML/XSL Problems  RSS feed

Alexander Mitchell
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run a web-app on Tomcat 4.0.4 and 4.0.6, it works fine on 4.1.18 but I'm trying to set it up on the earlier versions. The problem is that whenever it needs to transform xml using xsl stylesheets, I get the following exception:
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
javax.servlet.ServletException: Invoker service() exception
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:523)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)....
and also
root cause
java.lang.ClassFormatError: org/apache/xerces/dom/NodeImpl (Code segment has wrong length)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)....
(I haven't included all the lines)
What is the problem? Is there some compatability problem between the two? Other web-apps worked fine on both versions and servlets work fine - its just the transformations. I've got xalan.jar and xerces.jar installed in both the Tomcat/lib and relevant lib directories.
Andy Bowes
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like the Java Code Verifer is unable to load the xerces classes. This byte code verification is designed to stopped hacked java byte code being loaded into the JVM.
It is possible that the version of Xalan & Xerces that you are using has been compiled with a more recenet version of Java than the JVM that you are running in the Tomcat environment i.e 1.3 instead of 1.4.
I think you basically have 2 options
i) ensure that you have the latest version of Java in the run-time environment
ii) Find an older version of Xalan & Xerces that are compatible with your version of Tomcat.
Hope this helps
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!