Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 117372

Summary: Should not set project specific compiler level to JDK 5.0 when targetting Tomcat 5.5
Product: [WebTools] WTP Common Tools Reporter: Kathy Chan <kathy>
Component: wst.commonAssignee: Chuck Bridgham <cbridgha>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: cbrealey, tbashor
Version: 1.0   
Target Milestone: 1.0 M9   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Chan CLA 2005-11-21 16:22:09 EST
Driver:  1121_1619 S-build

If the user use the Dynamic Web project wizard to create a Web project, called "tc55",targetting Tomcat 5.5, then the compiler compliance level of the project is set to 5.0.

If the user had launch Eclipse with JDK 1.4.2, then other tools would have been launched with the JDK 1.4.2 and would have problem loading class files in the Tomcat 5.5 targetted project.

One way to illustrate this is to have a dynamic Web project called "tc50" which is targetting Tomcat 5.0.  It's project specific compiler compliance level is 1.4.  If "tc50" depends on "tc55", an Echo java main class in "tc50" that calls a "tc55" Echo class would not be able to run because of java.lang.UnsupportedClassVersionError.

The alternative the user would have is to go to the project's properties, go to the Java compiler to either 
- disable "project specific setting" so that the workspace default is used
OR
- change "generate .class files compatibility" and "source compatibility" to 1.4

The Web services tools is adversely impacted by this recent change of project specific compiler compliance setting because when the user launch Eclipse with 1.4.2, the Axis emitter runs on 1.4.2 and was not able to load a class that's targetted to Tomcat 5.5 and compiled with JDK 5.0.  This breaks the creation of bottom-up Web service.

However, the above is just an example of the impact to the user, other tools would be adversely affected by this change.  We don't think the tool should move the compiler compliance level ahead to 5.0 without warning the user and giving them the option to be backward compatible with 1.4.

Before this change (i.e. in drivers from a couple of weeks ago), the user can install Tomcat 5.5 to run in JDK 5.0, have their Web project targetting Tomcat 5.5 but still compiled using JDK 1.4.

We believe this problem needs to be fixed for M9.
Comment 1 Kathy Chan CLA 2005-11-21 16:29:38 EST
*** Bug 117073 has been marked as a duplicate of this bug. ***
Comment 2 Chuck Bridgham CLA 2005-11-22 08:22:39 EST
I'll take this one today, and we should revisit this topic, but I agree with Kathy, changing the compiler settings restricts the scenarios.
Comment 3 Chuck Bridgham CLA 2005-11-22 08:39:24 EST
Removed the compiler setting
Comment 4 Kathy Chan CLA 2005-11-23 16:29:30 EST
Verified on 1122_2206 S-build.