Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The Setup:-

  • OpenCMS running on TomCat5.5
  • System running on FreeBSD with the DiabloJVM

The OpenCMS system was working then after a restart of TomCat it stopped loading. The Database server (postgres) running on a different host has been rebooted and responds correctly.

Any suggestions to get it running?

When TomCat starts the following errors are in the stdout:

org.apache.openejb.OpenEJBException: org.apache.xbean.recipe.ConstructionException: Error invoking constructor: public org.apache.openejb.tomcat.catalina.TomcatSecurityService(): Error invoking constructor: public org.apache.openejb.tomcat.catalina.TomcatSecurityService()

...

6/12/09 10:11:29 AM (I) WebappClassLoader.validateJarFile : validateJarFile(/usr/local/tomcat5.5/webapps/opencms/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

`

6/12/09 9:21:08 AM (S) HostConfig.deployDirectory : Error deploying web application directory opencms
java.lang.ArrayIndexOutOfBoundsException: 26
    at org.apache.openejb.asm.ClassReader.readClass(Unknown Source)
    at org.apache.openejb.asm.ClassReader.accept(Unknown Source)
    at org.apache.openejb.asm.ClassReader.accept(Unknown Source)
    at org.apache.openejb.util.AnnotationFinder.readClassDef(AnnotationFinder.java:251)
    at org.apache.openejb.util.AnnotationFinder.find(AnnotationFinder.java:157)
    at org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1090)
    at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:540)
    at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.start(TomcatWebAppBuilder.java:234)
    at org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:58)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    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:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
share|improve this question

4 Answers 4

up vote 2 down vote accepted

I faced with that exception too, when trying to deploy OpenCMS and OpenEJB on the same Tomcat instance. It seems that OpenCMS and OpenEJB doesn't like each other.

However, I found a workaround: After deploying OpenCMS on Tomcat startup, I used The Manager webapp to upload and get OpenEJB running. It worked fine for me.

share|improve this answer
    
this is likely what the kind soul who set up the machine realised and never documented. Thus OpenEJB was deployed after start up which caused issues on restarts. –  Antitribu Jun 18 '09 at 10:20
Offending class: javax/servlet/Servlet.class

This is a fairly common warning for java applications. Because the web application container's classloader provides both the api and implementation for the servlet specification, a web application is prohibited from providing its own version.

However, as a developer of wep applications, it makes it a bit hard to compile your classes without tooling support, so it's tempting to include this the servlet.jar in your lib/ directory. This makes it pretty easy to accidentally ship a .war with it as well.

Because of this, Tomcat scans all classes as they are loaded, and if found, it blocks loading of the class presents this error.

share|improve this answer

This error appears to have been caused by another faulting application. Likely loaded after the server had already started so it wasn't until a reset that OpenCMS was affected. The likely culprit was openjb.

It was solved by removing all the webapps and replacing them one by one until all essential servers had come online.

Regrettably I cannot test more to find out the exact error at this time.

share|improve this answer

Looks like you application files are corrupt:

6/12/09 9:21:08 AM (S) HostConfig.deployDirectory : Error deploying web application directory opencms 
java.lang.ArrayIndexOutOfBoundsException: 26 at
org.apache.openejb.asm.ClassReader.readClass(Unknown Source) at
org.apache.openejb.asm.ClassReader.accept(Unknown Source) at 
org.apache.openejb.asm.ClassReader.accept(Unknown Source) at 
org.apache.openejb.util.AnnotationFinder.readClassDef(AnnotationFinder.java:251)


The app server might be keeping an old work/temp directory. Try deleting while it's stopped and redeploying.

share|improve this answer
    
I've tried redeploying the app from the .war and hit the same error. I've tried a working backup from a tar.gz and that throws the same unfortunately. The server has had nothing but graceful shutdowns and the log opencms s of don't seem to indicate any trauma last time it went down. I'm not a java programmer though so what in that error leads you to believe there is a corrupt file? –  Antitribu Jun 12 '09 at 9:28
    
The fact that reading a class fails: org.apache.openejb.asm.ClassReader.readClass –  Robert Munteanu Jun 12 '09 at 9:33
    
ok, thank you for that, will see what I can do, but the fact the error remains when i redeploy the app from the war is confusing. –  Antitribu Jun 12 '09 at 10:22
    
See my update - try cleaning work/temp dirs. –  Robert Munteanu Jun 12 '09 at 10:31
    
I've removed temp files from /usr/local/tomcat5.5/work/Catalina/localhost/OpenCMS and bounced the server to no joy unfortunately. –  Antitribu Jun 12 '09 at 10:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.