Community
Participate
Working Groups
1. Create Java project with Java 6 compliance level. Put a Java bean in it. 2. Select the Java bean in the Java project and select to create Axis1 Web service to run on Tomcat 5.0 (with JDK 1.4). Move service slider to Test. When the operation is run on the WSE, I got the error: Jan 11, 2008 3:04:16 PM org.apache.axis.transport.http.AxisServlet logException INFO: Exception: java.lang.UnsupportedClassVersionError: echo/Echo (Unsupported major.minor version 50.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:177) at java.security.AccessController.doPrivileged(Native Method) at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160) at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142) at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85) at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428) at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461) at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286) at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260) at org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:427) Running Axis1 Web service compiled with Java 5.0 on Tomcat 5.0 (installed with JDK 1.4) would result in similar error: Jan 11, 2008 3:14:45 PM org.apache.axis.transport.http.AxisServlet logException INFO: Exception: java.lang.UnsupportedClassVersionError: echo/Echo (Unsupported major.minor version 49.0) This is because the Java bean was compiled with a newer version of Java than the JDK used to run Tomcat 5.0.
In ValidationUtil, we need to check if the Java version in the Java project is compatible to the Web project that it will be added as J2EE module dependency. If it's not compatible, a validation error banner should be displayed.
Deferring to WTP 3.0 M6.
Created attachment 91698 [details] addition to validation
Thanks for the patch, Gil. I have a few concerns with the code: 1. The newly added check in ValidationUtils expect serverInstanceId to always be set. That's not the case. There are cases when the server has not been created yet and we only have serverId (which is the server factory type Id). We need to be able to tell if that server factory type Id can support the facet or not. 2. The code would have problem handling the case when initial project is not set. Such as the case when nothing in the workspace is set when creating client or skeleton. 3. I assume by !javaProjectName.equals("projectName") you mean !javaProjectName.equals(projectName) 4. Only need the check to check for whether the Java project can be added as J2EE project dependency to Web project. We don't need this to run when we start off with one project and choose another project to create the Web service or Web service client in. Please revise your patch.
Deferring out from M6. Please try to have the fix early next week as this is affecting some adoptors as well.
Created attachment 96325 [details] this replaces and fixes the problems mentioned by Kathy
Created attachment 96342 [details] Updated patch Updated patch that moves the check in ValidationUtil earlier (before runtimeChecker is called).
Patch committed and released to HEAD as v200804162107.
I forgot to get PMC approval before dropping one new error message for this fix: The {0} server does not support the Java project {1}.
Verified on 05/23 WTP 3.0 driver.