java.lang.ClassFormatError: Illegal Variable name

2001-12-04 Thread Douglas E. Hornig

There seems to be a problem with the Tomcat 4.0.1 class loader.  I have figured out 
how to get around it, but am posting it in case anyone else runs into it, or someone 
wants to fix it.

I have an application that works fine with Tomcat 3.2.x but when I ran it under 4.0.1 
I would get a ClassFormatError (see below).  I tried recompiling my jar file, putting 
it in all sorts of different directories, using class files instead of a jar, running 
with IBM Java 1.3 and Sun J2DSK 1.3.1 under Linux, and Sun J2SDK 1.3.1 on NT--no 
difference.  The solution turned out to be to edit one of my methods so it did not 
return from the middle of a synchronized block (also see below).

I apologize for using bandwidth if this has been covered before.
Doug

javax.servlet.ServletException: Error instantiating servlet class 
org.hitchcock.cismt.CisServlet
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:829)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:484)


root cause 

java.lang.ClassFormatError: org/hitchcock/cismt/CisMtStats (Illegal Variable name )
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:671)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1090)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:989)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:820)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 

J2SDK 1.3.1 on Linux Segmentation Fault

2001-07-03 Thread Douglas E. Hornig

A while ago I posted a question about a segmentation fault error I was getting with 
Tomcat.  The machine is SuSE Linux 7.1 and the application was fine with J2SDK 1.3 but 
when I switched to J2SDK 1.3.1 it aborted with a segmentation fault.  It turns out 
that it was aborting in the call to new DOMParser() in Xerces so it's not a Tomcat 
problem per se, but I still think it's worth mentioning what I found.

I have discovered that this is a documented problem (Sun Java bug database ID 
4466587).  The problem appears when an exception is thrown inside a deeply recursive 
call and seems to be related to glibc-2.2-x.  I gather that glibc-2.1-x enforced a 2M 
stack size limit but glibc-2.2-x does not, but it can only handle larger stacks if 
it's compiled with --enable-kernel=2.4.0 .  The workaround is to set 'ulimit -s 2048' 
in your bash shell or 'limit stacksize 2048' in tcsh before starting the VM.  I have 
not tried recompiling glibc.



RE: Tomcat 3.2.2 and Xerces

2001-06-19 Thread Douglas E. Hornig

I have had luck with Tomcat and Xerces by putting an underscore in front of xerces.jar 
(i.e., calling it _xerces.jar) and putting it into the $TOMCAT_HOME/lib directory with 
the rest of the jar files.  The shell script that generates the CLASSPATH puts them in 
alphabetical order (as Chris McNeilly pointed out) and underscores come out before 
letters.  At least in Unix, I'm not sure about DOS.


 -Original Message-
 From: Sam Newman [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 19, 2001 10:22 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Tomcat 3.2.2 and Xerces


 If it was an inbuilt limitation of Tomcat, I wouldn't expect to see a
 ClassDefNotFoundExceptionare you sure you've put your
 xerces parser .jar
 file in the WEB-INF/lib directory of your webapp?
 Also Mail Archive does have a search facility for this list.
 Its pretty crap
 but its better than nothing :-)

 sam
 - Original Message -
 From: Ben Rometsch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, June 19, 2001 3:08 PM
 Subject: Tomcat 3.2.2 and Xerces


  Hi There,
 
  I'm new to the group - apologies if this has been asked 100
 times before.
 
  I'm writing a web application that parses an XML file with
 SAX in order to
  retrieve database connection details. The beans responsible
 for this make
  use of the xerces XML parser. Testing the beans in
 JBuilder, everything
  works fine.
 
  When I compile the class files and attempt to invoke the
 methods through a
  jsp page in Tomcat, it throws a
 java.lang.NoClassDefFoundError error.
 
  I've been scouring Deja and the tomcat documentation. It
 sounds like I
 can't
  use another XML parser on top of the one tomcat uses to parse its
  configuration information. Is this correct? If this is the
 case, is the
 only
  solution to re-write the SAX parser bean to make use of JAXP?
 
  Thanks in advance,
  Ben
 snip




Re: Tomcat won't start with j2sdk 1.3.1 Linux

2001-06-16 Thread Douglas E. Hornig

Should I take the complete lack of any feedback on this subject to mean that no one 
has tried Tomcat/Linux/j2sdk 1.3.1?

--- Forwarded message from Douglas E. Hornig ---

Date: 15 Jun 2001 12:45:17 EDT
From: Douglas E. Hornig
Subject: Tomcat won't start with j2sdk 1.3.1  Linux
To: [EMAIL PROTECTED]

Has anyone run Tomcat under linux with j2sdk 1.3.1-b24?  I have been using Tomcat 
3.2.1 (and now 3.2.2) happily for some time now with j2sdk 1.3 and linux (SuSE 7.1, 
kernel 2.4.5).  I decided to get current with my Java VM, but when I try to start up 
Tomcat I get this error:

/usr/local/tomcat/bin/tomcat.sh: line 180: 20646 Segmentation fault  $JAVACMD 
$TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat $@

The only difference is the new Java SDK.  Other Java applications run successfully 
with the new SDK.  I also have Tomcat 3.2.2/j2sdk 1.3.1-b24 running fine under Solaris 
8.

Any ideas?

Thanks,
Douglas Hornig
Dartmouth-Hitchcock Medical Center



Tomcat won't start with j2sdk 1.3.1 Linux

2001-06-15 Thread Douglas E. Hornig

Has anyone run Tomcat under linux with j2sdk 1.3.1-b24?  I have been using Tomcat 
3.2.1 (and now 3.2.2) happily for some time now with j2sdk 1.3 and linux (SuSE 7.1, 
kernel 2.4.5).  I decided to get current with my Java VM, but when I try to start up 
Tomcat I get this error:

/usr/local/tomcat/bin/tomcat.sh: line 180: 20646 Segmentation fault  $JAVACMD 
$TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat $@

The only difference is the new Java SDK.  Other Java applications run successfully 
with the new SDK.  I also have Tomcat 3.2.2/j2sdk 1.3.1-b24 running fine under Solaris 
8.

Any ideas?

Thanks,
Douglas Hornig
Dartmouth-Hitchcock Medical Center




Solaris Performance Problem

2001-04-20 Thread Douglas E. Hornig

I have run into a strance performance problem with Tomcat that I am at a loss to 
figure out.  In a nutshell, when I run Tomcat (version 3.2.1, standalone) on a Solaris 
Sparc server and hit it with a Windows client, the minimum response time is is abount 
0.2 seconds.  This is for a simple servlet that just returns some static data.  That 
may not sound like a lot of time but if a client makes several requests to the server 
it can add up fast.  If I run the server on a Linux PC that number is about 0.01 
seconds or less.  I also get good performce if I use a Linux client and hit the 
Solaris server.

I have tried using different PC clients (different PCs, one running NT 4 and one with 
Windows 2000), different test programs (one in Java and one in Visual Basic) and it 
makes no difference.

I have tried using different Solaris servers, a 420R and an Ultra 5, neither with any 
kind of load.  I have tried different JDKs (1.2.2 and 1.3.0).  No difference.

I wrote a quickie standalone Java server for the Sparcs and their response time was 
very fast ( 0.01 secs).  The server reads a request, sends a reply, and closes the 
socket much like a web server would.

So the problem combination seems to be Solaris server with Tomcat and a PC client.  I 
know this sounds nuts but it's  totally repeatable and a very serious problem.  Does 
anyone have an idea what I can do to get to the bottom of this?

Thanks a lot.

Douglas Hornig
Dartmouth-Hitchcock Medical Center
Lebanon, NH