Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Tomcat Class unable to load when moving a site from Dev to Test servers

Posted on 2011-09-25
5
Medium Priority
?
716 Views
Last Modified: 2012-05-12
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
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

Open in new window

0
Comment
Question by:Bird757
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 36596797

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.UnsupportedClassVersionError: com/DBInit : Unsupported major.minor version 51.0 (unable to load class com.DBInit

What version of Java are you using on the Test server which runs Tomcat ?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36596801

>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 ?
0
 
LVL 28

Expert Comment

by:rrz
ID: 36596811
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.
0
 
LVL 47

Accepted Solution

by:
for_yan earned 2000 total points
ID: 36596863

Or run your Tomcat with Java 7
(install Java 7 and change JAVA_HOME ebevironment varaible to point at Java 7 )
0
 

Author Closing Comment

by:Bird757
ID: 36597098
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>java -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>
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question