tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim_Es...@universalpensions.com
Subject Problems running Tomcat through MS VM and VJ++
Date Fri, 09 Jun 2000 20:45:05 GMT
I am attempting to run Tomcat through the MS VM instead of the sun one
included in the JDK, and have everything working except for a problem in
Jasper.

The actual error that occurs is in a MessageFormatter.format() call done in
jasper\Constants.java : getString().  The error occurs when one of the args
passed is of any type outside of java.lang (or that's what it appears to
be).  args can be ints and Strings, but java.util.Hashtable and
org.apache.jasper.compiler.Mark cause it to error out, printing "Unknown
object of type:org.apache.jasper.compiler.Mark" to the output window.

Tomcat calls the getString function fine many times, and the server will
serve out webpages, run servlets, and allow me to debug them, but if I try
going to a .jsp page, the server returns an error to the browser (Root
cause : Illegal Argument Exception in MessageFormater.format).


That should be all you need to know, but here's some more information in
case it will help, or you are curious:
Classpath as reported by tomcat:
"d:\tomcat\;d:\tomcat\lib\xml.jar;d:\tomcat\lib\servlet.jar;D:
\tomcat\lib\ant.jar;D:\tomcat\lib\jasper.jar;D:\tomcat\lib\webserver.jar;C:
\WINNT\java\trustlib\;C:\WINNT\java\classes\;d:\tomcat\;"

o The JDK files are not included in the classpath because the equivalent
ones are in the MS classes packages (I believe).
o Objects of type Hashtable and .Mark all work correctly when they are
compiled in, it appears they just don't work when created on the fly.
o I am using the latest packaged download on the Tomcat site, 2.1 I believe

Full error reported by Tomcat to the browser:
Error: 500
Location: /examples/jsp/num/numguess.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSP
           at org/apache/jasper/runtime/JspServlet.loadJSP
(JspServlet.java:426)
           at
org/apache/jasper/runtime/JspServlet$JspServletWrapper.loadIfNecessary
(JspServlet.java:149)
           at
org/apache/jasper/runtime/JspServlet$JspServletWrapper.service
(JspServlet.java:164)
           at org/apache/jasper/runtime/JspServlet.serviceJspFile
(JspServlet.java:262)
           at org/apache/jasper/runtime/JspServlet.service
(JspServlet.java:370)
           at javax/servlet/http/HttpServlet.service (HttpServlet.java:854)
           at org/apache/tomcat/core/ServletWrapper.handleRequest
(ServletWrapper.java:507)
           at org/apache/tomcat/core/ContextManager.service
(ContextManager.java:561)
           at
org/apache/tomcat/service/http/HttpConnectionHandler.processConnection
(HttpConnectionHandler.java:163)
           at org/apache/tomcat/service/TcpConnectionThread.run
(SimpleTcpEndpoint.java:339)
           at java/lang/Thread.run (Thread.java)

Root cause:
java.lang.IllegalArgumentException: Unknown argument
           at java/text/MessageFormat.format (MessageFormat.java)
           at java/text/MessageFormat.format (MessageFormat.java)
           at java/text/Format.format (Format.java)
           at org/apache/jasper/Constants.getString (Constants.java:209)
           at org/apache/jasper/Constants.message (Constants.java:245)
           at org/apache/jasper/compiler/Parser.parse (Parser.java:1077)
           at org/apache/jasper/compiler/Parser.parse (Parser.java:1039)
           at org/apache/jasper/compiler/Parser.parse (Parser.java:1035)
           at org/apache/jasper/compiler/Compiler.compile
(Compiler.java:182)
           at org/apache/jasper/runtime/JspServlet.loadJSP
(JspServlet.java:413)
           at
org/apache/jasper/runtime/JspServlet$JspServletWrapper.loadIfNecessary
(JspServlet.java:149)
           at
org/apache/jasper/runtime/JspServlet$JspServletWrapper.service
(JspServlet.java:164)
           at org/apache/jasper/runtime/JspServlet.serviceJspFile
(JspServlet.java:262)
           at org/apache/jasper/runtime/JspServlet.service
(JspServlet.java:370)
           at javax/servlet/http/HttpServlet.service (HttpServlet.java:854)
           at org/apache/tomcat/core/ServletWrapper.handleRequest
(ServletWrapper.java:507)
           at org/apache/tomcat/core/ContextManager.service
(ContextManager.java:561)
           at
org/apache/tomcat/service/http/HttpConnectionHandler.processConnection
(HttpConnectionHandler.java:163)
           at org/apache/tomcat/service/TcpConnectionThread.run
(SimpleTcpEndpoint.java:339)
           at java/lang/Thread.run (Thread.java)



o I need to use the MS VM/VJ++ because the MS JDBC:ODBC bridge driver is
infinitely better than Sun's (as far as stability and reliability goes),
and MS's will not work in the Sun or Symantec VM, and surprisingly Sun's
won't work in the MS VM.
o I have Symantec VCafe set up to run Tomcat and debug both servlets and
.JSP files and they both work fine.
o I needed to make certain code changes to the Tomcat source to fix some
errors, which included:
     o Disabling tag-lib support because lines in "TagLibraryInfoImpl"
wouldn't compile
          NodeList nList =  webtld.getElementsByTagName("taglib");  // gave
"Cannot access ParentNode - only Public classes and interfaces can be
accessed
     o Changed in WARConnection:
          FileNameMap map = URLConnection.getFileNameMap();
     to
          FileNameMap map = URLConnection.fileNameMap;




I hope someone can make something of all this.  I've been working for quite
a few hours and have not figured anything out.  I've thought of a couple
things, but haven't figured any way to test them, or haven't came to a
conclusion.
Possibly the classpath in the compiling environment includes something that
the classpath in the running environment doesn't, in which case it can find
the classes (like Hashtable) when it compiles them, but can't create them
dynamically (can't do it with a Class.forName() either).  But, running from
the command line, the classpaths should be identical when compiling and
running, since I specify nothing different...


Please send help :)
     jimb



Mime
View raw message