> Date: Tue, 27 Dec 2011 16:56:41 -0500
> From: ch...@christopherschultz.net
> To: users@tomcat.apache.org
> Subject: Re: [OT] ClassFormatException: Invalid constant pool reference
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Denis,
> 
> On 12/27/11 7:53 AM, Denis Ivanov wrote:
> > Hey, I have an Amazon Enterprise Linux (EC2) version 
> > 2.6.35.11-83.9.amzn1.i686 (architecture i386) with Java JM version 
> > 1.6.0_20-b20 (Vendor Sun Microsystems Inc.) and Apache Tomcat
> > version 7.0.19 with Catalina.
> > 
> > I'm trying to deploy GlobziWebApplication.war and it was working a 
> > few days ago but now it gives me error 404 when I try to access
> > the web service and logs/catalina.out says
> > 
> > Error deploying web application archive GlobziWebApplication.war 
> > org.apache.tomcat.util/.bcel.classfile.ClassFormatException:Invalid
> >
> > 
> constant pool reference: 12034. Constant pool size is: 1486
> 
> I wouldn't expect a ClassFormatException to return a 404. Are you sure
> that the two are related?
Well if it can't deploy the web application then it can't serve it, thus the 
404.
> 
> Also, the above has a "/" in the package name which is illegal. Are
> you sure you copy/pasted that properly?
Oops, the / is a mistake.
> 
> > And then it lists a bunch of instances where this occurs, like "at 
> > org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184)".
> 
> This
> > 
> is called a stack trace, and isn't a bunch of instances where it
> occurs: it's a specific call trace that describes what the thread was
> doing at the time the exception was thrown.
> 
> Can you post the full stack trace?
Dec 27, 2011 8:50:26 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/GlobziWebApplication]
Dec 27, 2011 8:50:26 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive GlobziWebApplication.war
Dec 27, 2011 8:50:26 AM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive GlobziWebApplication.war
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid constant 
pool reference: 12034. Constant pool size is: 1486
        at 
org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184)
        at 
org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:203)
        at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:109)
        at org.apache.tomcat.util.bcel.classfile.Code.<init>(Code.java:86)
        at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:140)
        at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:58)
        at org.apache.tomcat.util.bcel.classfile.Method.<init>(Method.java:72)
        at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:268)
        at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:128)
        at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1967)
        at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1914)
        at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1905)
        at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1905)
        at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1905)
        at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1828)
        at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1295)
        at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896)
        at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
        at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
        at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)
        at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)
        at java.lang.Thread.run(Thread.java:636)
> 
> > What is Invalid constant pool reference?
> 
> It usually means that your class file is broken, but I can see that
> you are using BCEL which probably means that you poking-around in a
> class structure without using the usual Java reflection or
> ClassLoading libraries. That can introduce all kinds of problems if
> you aren't careful.
> 
> A stack trace will help narrow-down where this is happening. It's
> possible that some of the annotation-processing that Tomcat does is
> incorrect and that's why it's blowing up.
> 
> > GlobziWebApplication.war was compiled using NetBeans 7.0.1.
> 
> Were the classes in GlobizWebApplication.war compiled using NetBeans,
> or only JARred-together using NetBeans?
The whole project is built using NetBeans.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk76PxkACgkQ9CaO5/Lv0PDvjQCePkbar+zEiv8H0cIBVY4z6PvJ
> 5oAAoLLXOxt7UX2Iuop0EUNLIDFBhGSc
> =n8TZ
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
                                          

Reply via email to