-2

I have a a GWT application and I want to create a war file using hudson .So I have created a job and in the configuration I have checked the build option i.e invoke ant. so it uses the build.xml from my application and creates the war file . And my ant file i.e build.xml contains following targets:

1.Java compilation

2.GWT compilation

3.Create a war

4.Deploy it into tomcat with JDK 1.7.0

Application is compiling using jdk 1.6 and deploy it into the tomcat with jdk 1.7 but its not working. Is tomcat with JDK 1.7.0 is compatible with 1.6. ?? or is there another problem because some gwt-dev,gwt-user jars are still in war folder. In my tomcat logs following info is there:

INFO: Deploying web application archive /usr/local/tomcat_lh/webapps/Nightly.war
Dec 19, 2012 10:13:41 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/usr/local/tomcat_lh/webapps/Nightly/WEB-INF/lib/gwt-dev.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Dec 19, 2012 10:13:41 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/usr/local/tomcat_lh/webapps/Nightly/WEB-INF/lib/gwt-user.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

Dec 19, 2012 10:13:41 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/usr/local/tomcat_lh/webapps/Nightly/WEB-INF/lib/javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Dec 19, 2012 10:13:41 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart

pbhle
  • 2,856
  • 13
  • 33
  • 40

1 Answers1

0

It is far, far more likely that you are doing something wrong.

I suspect if you deploy to Java 6 you will see the same issues, if not exactly the same errors. The only difference might be you would see different line numbers in the stack traces.

FYI: The code base for Java 7 and recent versions of Java 6 is very similar and even shares many of the same bugs. e.g. the was a well known bug in Java 7 when it was released to do with loop optimisation and people suggested waiting for it to be fixed before migrating. The interesting thing was the bug was also in Java 6, the only difference was that the optimisation was on by default in Java 7 and off by default in Java 6.

BTW: Most of the performance improvements in Java 7 were back ported into Java 6 so the only good reason to use Java 7 is a) you want to use the new syntax b) you are concerned that Java 6 is EOL.

In your case, there might be no good reason to use Java 7, for now.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
  • my war is working on tomcat with jdk 1.6 but not with 1.7.. :( – pbhle Dec 19 '12 at 10:02
  • And everything else is identical, the only difference is which version of Java you are using. Are you use Java 7 update 10? If you have an early version of 1.7.0 it could have bugs. – Peter Lawrey Dec 19 '12 at 10:08
  • jdk version to compile is 1.6_30 and tomcat where I am deploying the war using Jdk 1.7_04 – pbhle Dec 19 '12 at 10:29
  • That should be ok. I would try Java 7 udpate 10 just to be sure its not a fixed bug in Java 7. – Peter Lawrey Dec 19 '12 at 10:32
  • 1
    actually my application was using javaee-api-6.jar so it was not working on tomcat with jdk 7 when I removed that jar It worked for me with jdk 7. Thanks for your help. – pbhle Dec 19 '12 at 11:56