This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Copied Tomcat 6 webapp working fine on one server but not another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Copied Tomcat 6 webapp working fine on one server but not another" Watch "Copied Tomcat 6 webapp working fine on one server but not another" New topic
Author

Copied Tomcat 6 webapp working fine on one server but not another

Angus Comber
Ranch Hand

Joined: Jul 16, 2011
Posts: 90
I am running tomcat 6, 64 bit on a Windows 7 64 bit platform. I copied my web application (entire folder - it is called cuba4remedy) to a tomcat 6 64 bit installation on a different machine. this one running Windows 2008 standard 64 bit.

The servlet was working fine on my Windows 7 development machine but when I run on the new machine I see this error in the Catalinaxxx.log :-

SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/cuba4remedy,J2EEApplication=none,J2EEServer=none

I don't really understand why I am getting this error. Any ideas anyone?

One more point might be relevant. I compiled on my dev machine using Javac version 1.7. On the machine I copied to only the Java runtime is installed - that is Java version 1.6.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
I would certainly try recompiling with the command line option -target 6

See the javac options.

Bill
Angus Comber
Ranch Hand

Joined: Jul 16, 2011
Posts: 90
William Brogden wrote:I would certainly try recompiling with the command line option -target 6

See the javac options.

Bill


I did try -target 1.6 but it errored. It was quite simple for me to download the v1.6 sdk so I did that and recompiled and it fixed the problem. I was a bit surprised though because I was not using any v1.7 features as far as I was aware.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Compiled classes get labeled with the Java version they are compiled for. Java 6 won't run a class compiled for 7 due to this label, not the features.

Bill
Angus Comber
Ranch Hand

Joined: Jul 16, 2011
Posts: 90
William Brogden wrote:Compiled classes get labeled with the Java version they are compiled for. Java 6 won't run a class compiled for 7 due to this label, not the features.

Bill


The trouble is customers are likely to have java jvm 1.4, 1.5, 1.6 and possibly 1.7. So for maximum compatibility and least deployment headaches I guess best to restrict yourself to only say 1.4 or 1.5 features?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
See the Java version history at Wikipedia.

Versions 1.4 and 1.5 are no longer supported and 1.6 reaches end of life soon. As a consultant you should be letting customers know the dangers of out of date java and helping them update.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Copied Tomcat 6 webapp working fine on one server but not another
 
Similar Threads
start/stop Tomcat 7 windows service on 64-bit results in error
Installing Tomcat 6 (64 bit) on Windows Server 2008 R2.
Tomcat Services windows 7 professional 64 bit
32-bit development vs 64-bit deployment