You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Horine Travis Contr AEDC/ATA <Tr...@arnold.af.mil> on 2007/03/13 21:12:17 UTC

Tomcat 5.5 failure to deploy javac 1.6 servlet

Just recently upgraded our server to use tomcat 5.5 with JRE 1.6 (was tomcat
4.0 with JRE 1.3). We had several poorly written servlets that still manage
to compile under both javac 1.3 and javac 1.6.  When I compile them under
javac 1.6 they no longer deploy correctly under tomcat 5.5. I have used the
same 1.6 compiler to compile some of the tomcat 5.5 servlet examples and
they continue to deploy correctly. Basically I have no idea how to
cross-reference Signature index 63 from the class file to whatever in the
java source code is causing it. Has anybody seen this kind of behavior
before? The strange thing is I can put a static void main(...) sub in the
class and am able to compile and execute it from the command line so I know
the JRE 1.6 is able to load the class ...just tomcat seems to have the class
loading problem....

 

Thanks for any help,

Travis.Horine@arnold.af.mil <ma...@arnold.af.mil> 

 

Error message from tomcat stdout file:

 

SEVERE: Error deploying web application archive dimReporting.war

java.lang.ClassFormatError: Signature index 63 in LocalVariableTable has bad
constant type in class file
mil/af/arnold/cm/dimensions/reporting/CrStatusServlet

            at java.lang.ClassLoader.defineClass1(Native Method)

            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

            at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

            at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1650)

            at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:856)

            at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1305)

            at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1187)

            at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
27)

            at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)

            at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3880)

            at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4141)

            at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
59)

            at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)

            at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

            at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)

            at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)

            at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)

            at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)

            at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)

            at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)

            at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)

            at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

            at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

            at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)

            at
org.apache.catalina.core.StandardService.start(StandardService.java:450)

            at
org.apache.catalina.core.StandardServer.start(StandardServer.java:680)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:536)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

            at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

            at java.lang.reflect.Method.invoke(Method.java:597)

            at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)

            at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


RE: Tomcat 5.5 failure to deploy javac 1.6 servlet

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Horine Travis Contr AEDC/ATA 
> [mailto:Travis.Horine@arnold.af.mil] 
> Subject: Tomcat 5.5 failure to deploy javac 1.6 servlet
> 
> Basically I have no idea how to cross-reference Signature 
> index 63 from the class file to whatever in the java source
> code is causing it. Has anybody seen this kind of behavior
> before?

Can't say I've seen it, but you should be able to use javap to dump the
class file of interest, and at least identify what index 63 actually
points to.  You also might want to use -Xlint:all with javac to see if
there are ny suspect constructs in the source code.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 5.5 failure to deploy javac 1.6 servlet

Posted by Boris Unckel <bo...@gmx.net>.
Hello Travis,

Horine Travis Contr AEDC/ATA wrote:
> Just recently upgraded our server to use tomcat 5.5 with JRE 1.6 (was tomcat
> 4.0 with JRE 1.3). We had several poorly written servlets that still manage
> to compile under both javac 1.3 and javac 1.6.  When I compile them under
> javac 1.6 they no longer deploy correctly under tomcat 5.5. I have used the
> same 1.6 compiler to compile some of the tomcat 5.5 servlet examples and
> they continue to deploy correctly. Basically I have no idea how to
> cross-reference Signature index 63 from the class file to whatever in the
> java source code is causing it. Has anybody seen this kind of behavior
> before? The strange thing is I can put a static void main(...) sub in the
> class and am able to compile and execute it from the command line so I know
> the JRE 1.6 is able to load the class ...just tomcat seems to have the class
> loading problem....
>   
which -source -target version did you specify?
Please have a try with
JDK 1.3 -> javac -source 1.3 -target 1.3 ....
and
JDK 1.6 -> javac -source 1.6 -target 1.6 .....

Regards
Boris


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 5.5 failure to deploy javac 1.6 servlet

Posted by Reinhard Moosauer <rm...@moosauer.de>.
Hi,

does your tomcat instance really use JRE 1.6 ?
You can easily check in the manager app.

Anyway I would suggest to always use
-source 1.4 -target 1.4 
for older Classes, because you avoid all possible syntax problems.

Other combinations of source/target could be tested if you suspect a javac 
bug.
Maybe this helps

R.

Am Dienstag, 13. März 2007 21:12 schrieb Horine Travis Contr AEDC/ATA:
> Just recently upgraded our server to use tomcat 5.5 with JRE 1.6 (was
> tomcat 4.0 with JRE 1.3). We had several poorly written servlets that still
> manage to compile under both javac 1.3 and javac 1.6.  When I compile them
> under javac 1.6 they no longer deploy correctly under tomcat 5.5. I have
> used the same 1.6 compiler to compile some of the tomcat 5.5 servlet
> examples and they continue to deploy correctly. Basically I have no idea
> how to cross-reference Signature index 63 from the class file to whatever
> in the java source code is causing it. Has anybody seen this kind of
> behavior before? The strange thing is I can put a static void main(...) sub
> in the class and am able to compile and execute it from the command line so
> I know the JRE 1.6 is able to load the class ...just tomcat seems to have
> the class loading problem....
>
>
>
> Thanks for any help,
>
> Travis.Horine@arnold.af.mil <ma...@arnold.af.mil>
>
>
>
> Error message from tomcat stdout file:
>
>
>
> SEVERE: Error deploying web application archive dimReporting.war
>
> java.lang.ClassFormatError: Signature index 63 in LocalVariableTable has
> bad constant type in class file
> mil/af/arnold/cm/dimensions/reporting/CrStatusServlet
>
>             at java.lang.ClassLoader.defineClass1(Native Method)
>
>             at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>
>             at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>
>             at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassL
>o ader.java:1650)
>
>             at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.ja
>v a:856)
>
>             at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.ja
>v a:1305)
>
>             at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.ja
>v a:1187)
>
>             at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1
>0 27)
>
>             at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
>
>             at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java
>: 3880)
>
>             at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4141)
>
>             at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:
>7 59)
>
>             at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>
>             at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>
>             at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>
>             at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>
>             at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>
>             at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>
>             at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>
>             at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppo
>r t.java:119)
>
>             at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>
>             at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>
>             at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>
>             at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>
>             at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>
>             at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
>
>             at
> org.apache.catalina.startup.Catalina.start(Catalina.java:536)
>
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>             at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9 )
>
>             at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l .java:25)
>
>             at java.lang.reflect.Method.invoke(Method.java:597)
>
>             at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>
>             at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org