• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

tomcat in unix server issues

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone

I am using tomcat version 6 in the unix server. When I try to run the sh version.sh file I get an error saying bad version. bin/bootstrap is not working i believe. I checked the jdk and jre version . They are compatible . I used commands java -version and javac -version to check the compatibility of java and compiler version.

Recently I developed an application using GWT framework. When I deploy the application on the local tomcat server it wrks greats in the windows. I am using jdk 1.7 and jre7 in my local and verified on both tomcat version 6 & 7. The application worked great and have no issues. I used ANT script to package the application so to deploy on unix server. I used the same ANT script to build the package when I deployed on local tomcat.

Can anyone suggest what exactly could have gone wrong. Based on the error I understand compiler is not compatible to java version. When I run the sh version.sh in unix it showed the JRE HOME variable as /usr folder. I found in that folder java and jre compatible. Please help . Thanks
 
Sheriff
Posts: 4643
582
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the output from version.sh. This what I see with my setup - running Tomcat 7, JDK 6u17, Centos 6.

# ./version.sh
Using CATALINA_BASE: /home/tomcat/apache-tomcat-7.0.30
Using CATALINA_HOME: /home/tomcat/apache-tomcat-7.0.30
Using CATALINA_TMPDIR: /home/tomcat/apache-tomcat-7.0.30/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/tomcat/apache-tomcat-7.0.30/bin/bootstrap.jar:/home/tomcat/apache-tomcat-7.0.30/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.30
Server built: Sep 2 2012 09:50:47
Server number: 7.0.30.0
OS Name: Linux
OS Version: 2.6.32-71.el6.x86_64
Architecture: amd64
JVM Version: 1.6.0_17-b17
JVM Vendor: Sun Microsystems Inc.
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JRE_HOME=/usr indicates that you are using the open-source Java to run Tomcat instead of one of the commercial JDKs available from Oracle or Sun.

I'm afraid that the open-source Java isn't fully functional. Your best bet would be to download and install a Sun/Oracle JDK and setup your Tomcat start process to have the environment variable JAVA_HOME point to that JDK.
 
shashank beerla
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Here is the error details

mktforecast:v0937689 $ sh version.sh
Using CATALINA_BASE: /mktg/fsa18/wwwroot/tomcat_dev
Using CATALINA_HOME: /mktg/fsa18/wwwroot/tomcat_dev
Using CATALINA_TMPDIR: /mktg/fsa18/wwwroot/tomcat_dev/temp
Using JRE_HOME: /usr
Using CLASSPATH: /mktg/fsa18/wwwroot/tomcat_dev/bin/bootstrap.jar:/mktg/fsa18/wwwroot/tomcat_dev/bin/tomcat-juli.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic