Bird757
asked on
Tomcat Class unable to load when moving a site from Dev to Test servers
I have a web site I have been developing for a while (other people did the dev so excuse my ignorance of Tomcat / Java)... My dev server is running Tomcat 5.5.31 and JDK 1.6.026 and the database is MS SQL 2008 R2
When I try move this to my test server I get an error about a DBInit class that cannot load (I have pasted the log in full below). The only difference I am aware of is MS SQL is Version 2008 (not R2).
I then tried it on another server with MS SQL 2008 R2 and the same error (unable to load class com.DBInit) occurs.
There must be something one of the developers loaded on the Dev server that was undocumented. Does anyone have any idea what the problem could be?
Thanks
When I try move this to my test server I get an error about a DBInit class that cannot load (I have pasted the log in full below). The only difference I am aware of is MS SQL is Version 2008 (not R2).
I then tried it on another server with MS SQL 2008 R2 and the same error (unable to load class com.DBInit) occurs.
There must be something one of the developers loaded on the Dev server that was undocumented. Does anyone have any idea what the problem could be?
Thanks
Sep 25, 2011 1:38:53 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Tomcat\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Dell\SysMgt\RAC5;C:\Program Files (x86)\Dell\SysMgt\oma\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;.
Sep 25, 2011 1:38:53 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-192.168.100.34-80
Sep 25, 2011 1:38:53 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 451 ms
Sep 25, 2011 1:38:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 25, 2011 1:38:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.34
Sep 25, 2011 1:38:54 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Sep 25, 2011 1:38:54 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory ROOT
java.lang.UnsupportedClassVersionError: com/DBInit : Unsupported major.minor version 51.0 (unable to load class com.DBInit)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1964)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
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:980)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
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(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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Sep 25, 2011 1:38:54 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-192.168.100.34-80
Sep 25, 2011 1:38:54 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 25, 2011 1:38:54 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/20 config=null
Sep 25, 2011 1:38:54 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Sep 25, 2011 1:38:54 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 752 ms
>My dev server is running Tomcat 5.5.31 and JDK 1.6.026
Now you are rnunning on the test server which is different form your dev server, correct?
Can't it be that you are running Tomcat say with java 1.5 ?
The error message is telling you that the class DBInit was compiled with Java 7.
You need to compile it with JDK 1.6 since that is what is on your server.
You need to compile it with JDK 1.6 since that is what is on your server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the insights. Somehow I have ended up with a mixed version of Java on the Dev server. JAVA_HOME points to the JDK 1.6 installation (java.exe is SE 6.0.260.3), but there is a registry setting referring to 1.7. And when I checked installed programs I see someone installed Java 7. I am going to have to address this with the developers.
Thanks for the help!
Microsoft Windows [Version 6.1.7601]
C:\Users\Administrator>jav a -version
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion '
has value '1.7', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.
C:\Users\Administrator>
Thanks for the help!
Microsoft Windows [Version 6.1.7601]
C:\Users\Administrator>jav
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion
has value '1.7', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.
C:\Users\Administrator>
This kind of error usuall hints taht certain class
was compiled with Java newer than the virtual machine you want to execute it with:
java.lang.UnsupportedClass
What version of Java are you using on the Test server which runs Tomcat ?