aspose file tools*
The moose likes Tomcat and the fly likes java.lang.ClassFormatError: in Start up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "java.lang.ClassFormatError: in Start up " Watch "java.lang.ClassFormatError: in Start up " New topic
Author

java.lang.ClassFormatError: in Start up

babu thannasi
Greenhorn

Joined: Feb 26, 2006
Posts: 9
Hi all,

i am getting 404 for all files in Tomcat ..

what i did is just complied the servlet and placed the class file in respective dir and placed the web.xml in Beer-v1/web-inf/
and restarted the tomcat.

when i tried to invoke the url http://localhost:8080/Beer-v1/form.html
i got 404. ( note: i have my html in beer-v1 folder).


i am Using Tomcat5.5, windows XP home , jdk1.5.0_06
just pasting what i got in localhost.log .

Jun 28, 2006 6:31:42 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
Jun 28, 2006 6:31:42 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class listeners.ContextListener
java.lang.ClassFormatError: Extra bytes at the end of class file listeners/ContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
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.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
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:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jun 28, 2006 6:31:42 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class listeners.SessionListener
java.lang.ClassFormatError: Extra bytes at the end of class file listeners/SessionListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
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.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
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:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jun 28, 2006 6:31:42 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)

is anybody faced this issue ? if so how did you resloved it?

Thanks in Advance
Babu
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

what i did is just complied the servlet and placed the class file in respective dir and placed the web.xml in Beer-v1/web-inf/



'web-inf' or 'WEB-INF'?
It's case sensitive.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
babu thannasi
Greenhorn

Joined: Feb 26, 2006
Posts: 9
Thanks for the Replay Ben.
Sorry it was a Typo ..it was WEB-INF only..
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It's a good idea, when asking others to spend time on your problem, to make sure you don't waste their time with misleading errors like this.
Had WEB-INF been spelled correctly, I wouldn't have taken the time to guess that this was the issue.

Moving on...
I can see that the 'Balancer' app is the one throwing the exceptions.
Did you put your files in the directory structure for that app?
If so, why?

If not, maybe someone altered something in that application.
If you're not using the Balancer app, you might want to un-deploy it to prevent it from acting up and causing problems.

You can un-deploy apps from the Tomcat Manager application.
babu thannasi
Greenhorn

Joined: Feb 26, 2006
Posts: 9
Thanks a lot for Your Valueable time Ben .

i have uninstalled Tomcat Version 5.5.16 and installed Tomcat Version 5.5.17 .. its working fine .

Thanks
Babu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.ClassFormatError: in Start up