[Bug 110] New: Tomcat 3.3.1 serious reflection problem

[email protected] Tue, 8 Mar 2005 20:14:36 -0500
Newsgroups gmane.comp.java.vm.sablevm.bugs
Message-ID <[email protected]>
http://sablevm.org/bugs/show_bug.cgi?id=110

           Summary: Tomcat 3.3.1 serious reflection problem
           Product: SableVM
           Version: staging
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]


While trying to start Tomcat one gets this (and a few consecutive) exception:
"java.lang.IllegalArgumentException: argument of incorrect type
 at java.lang.reflect.Method.invoke (Method.java:461)"

What's interesting 1.1.9 seems to produce less exceptions that current
staging, so it might suggest the problem got worse with ie. introduction
of StackWalker or maybe some Class loader changes?

Below is the instruction how to reproduce the problem.

-------- Instalation of Tomcat (thanks to [email protected]) --------

-----Original Message-----
From: Varsha Agrawal (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS)
Sent: Wednesday, March 02, 2005 3:23 PM
To: 'Grzegorz B. Prokopski'
Cc: '[email protected]'
Subject: RE: sableVM running tomcat

Hello,
The tomcat installation procedure and the way to run it is given below.
The error which comes when I run it using the sablevm is given below:

The tomcat version I am using is Jakarta-tomcat-3.3.1a.
Google will give u list of sites of where you could download the tomcat.

http://apache.mirror.positive-internet.com/jakarta/tomcat-3/bin/jakarta-tomcat-3.3.1a.tar.gz

I am trying to run this in the redhat machine with the linux version
7.2.

Steps:
1. download the source code of the Jakarta-tomcat-3.3.1a
2. untar in using tar -zxvf Jakarta-tomcat-3.3.1a.tar.gz with a prefix
if u need of where u want to store, say /home/Jakarta-tomcat/
3. go to bin directory where the tomcat got installed and try running
./startup.sh script. This is possible only if you're a root.
You can see it running only if your jvm is installed.

I first tried running tomcat using Sun jvm(java) and to check whether
tomcat is running or not I just opened a browser and typed :
http://<ip-address>:8080. The tomcat default page opens. This shows the
tomcat is running.

----- Running ------------

gadek:/tmp/jakarta-tomcat-3.3.1a# (export
JAVA_HOME=/home/gadek/work/usr/lib/sablevm; ./bin/tomcat.sh start)
Using classpath: ./bin/../lib/tomcat.jar
Using JAVA_HOME: /home/gadek/work/usr/lib/sablevm
Using TOMCAT_HOME: .

java.lang.IllegalArgumentException: argument of incorrect type
   at java.lang.reflect.Method.invoke (Method.java:461)
   at org.apache.tomcat.util.IntrospectionUtils.setProperty
(IntrospectionUtils.java:333)
   at org.apache.tomcat.util.IntrospectionUtils.processArgs
(IntrospectionUtils.java:654)
   at org.apache.tomcat.util.IntrospectionUtils.processArgs
(IntrospectionUtils.java:635)
   at org.apache.tomcat.startup.EmbededTomcat.processArgs (EmbededTomcat.java:728)
   at org.apache.tomcat.startup.EmbededTomcat.execute1 (EmbededTomcat.java:695)
   at org.apache.tomcat.startup.EmbededTomcat$1.run (EmbededTomcat.java:687)
   at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run (Unknown
Source)
   at java.security.AccessController.doPrivileged (AccessController.java:191)
   at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged (Unknown Source)
   at org.apache.tomcat.startup.EmbededTomcat.execute (EmbededTomcat.java:685)
   at java.lang.reflect.Method.invokeNative (Method.java)
   at java.lang.reflect.Method.invoke (Method.java:621)
   at org.apache.tomcat.util.IntrospectionUtils.execute (IntrospectionUtils.java:87)
   at org.apache.tomcat.startup.Main.execute (Main.java:313)
   at org.apache.tomcat.startup.Main.main (Main.java:140)
   at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
   at java.lang.VirtualMachine.main (VirtualMachine.java:108)
ERROR reading /tmp/jakarta-tomcat-3.3.1a/conf/server.xml
At Line 13 /Server/ContextManager/LoaderInterceptor11/ useApplicationLoader=true

This exception is followed by another 5 or 6 exceptions, but they
might simply be a consequence of the first one.  This is with current
staging version.


Note that the behaviour with SableVM 1.1.9 was somewhat different:

gadek:/tmp/jakarta-tomcat-3.3.1a# (export JAVA_HOME=/usr/lib/sablevm;
./bin/tomcat.sh start)
Using classpath: ./bin/../lib/tomcat.jar
Using JAVA_HOME: /usr/lib/sablevm
Using TOMCAT_HOME: .
gadek:/tmp/jakarta-tomcat-3.3.1a# java.lang.InternalError:
java.lang.ClassNotFoundException: org.apache.tomcat.core.ContextManager not
found in [file:/usr/share/java/gnujaxp.jar,
file:/tmp/jakarta-tomcat-3.3.1a/./bin/../lib/tomcat.jar]
   at java.lang.reflect.ReflectUtil.typeToClass (ReflectUtil.java:103)
   at java.lang.reflect.ReflectUtil.getReturnType (ReflectUtil.java:159)
   at java.lang.reflect.Method.getReturnType (Method.java:175)
   at java.lang.Class$MethodKey.Class$MethodKey (Class.java:911)
   at java.lang.Class.internalGetMethods (Class.java:1109)
   at java.lang.Class.getMethods (Class.java:1078)
   at org.apache.tomcat.util.IntrospectionUtils.findMethods
(IntrospectionUtils.java:727)
   at org.apache.tomcat.util.IntrospectionUtils.findMethod
(IntrospectionUtils.java:733)
   at org.apache.tomcat.util.IntrospectionUtils.setAttribute
(IntrospectionUtils.java:106)
   at org.apache.tomcat.startup.Main.execute (Main.java:304)
   at org.apache.tomcat.startup.Main.main (Main.java:140)
   at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
   at java.lang.VirtualMachine.main (VirtualMachine.java:108)
[ btw. no further exceptions shows up!]

Not sure whether it was "better" in 1.1.9 than it is now.  I remember
David had important fixes to reflection after the introduction of
StackWalker.  This makes me think that maybe intruduction of the
StackWalker broke even more seriously  something in reflection that
was somewhat broken already?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.