I'm using eclipse jee 3.3.0 and I've added an apache tomcat 5.5.23 server to eclipse running on JRE 1.5.0_12. My web project is also running on JRE 1.5.0_12 with a Compiler compliance level of 5.0 and Project Facets Java 5.0.
I was using eclipse 3.2 with exadel and things were just fine, but now that I've switch to eclipse jee 3.3 (vanilla), I get this error.
Project facet Java 5.0 is not supported by target runtime Apache Tomcat v5.5
When you break the big rules, you get a lot of little rules.
Joined: May 02, 2007
Well, I got the error to go away by modifying my org.eclipse.wst.common.project.facet.core.xml which was created when I built my project with maven (mvn eclipse:eclipse -Dwtpversion=1.0). I simply removed the line <runtime name="Apache Tomcat v5.5"/>. I can run this web app under tomcat 5.0.28 and tomcat 6.0.13, but still not 5.5.23.
Now, when I say running it "under tomcat" I mean under the server I have defined in my Servers project in eclipse jee 3.3. I can run the war file just fine under my tomcat 5.5.23 that I unziped on my hard drive (which incidently is where I have my server pointing to under my servers project).
Now I've tried changing my Project Facet Java to 5.5, but then eclipse complains that it doesn't match my compiler level (5.0), and I don't see how I can change my compiler level to 5.5 as there is only levels 1.3, 1.4, 5.0 and 6.0. Exadel however was able to somehow burn the candle at both ends and all was good, but exadel doesn't support Europa yet . Does anyone have any ideas?
Joined: May 02, 2007
Ok, I created an new Dynamic web project using Eclipse's New > Project, and set Apache Tomcat v5.5 as it's target runtime. This created a new runtime called Apache Tomcat v5.5 (2), since the original Apache Tomcat v5.5 runtime, the one I've been having dificulties with, still existed.
This new runtime liked my project just fine. So I removed the original Apache Tomcat v5.5 runtime and renamed the new one and all's well that ends well. Oh, I diff'd the config files for both runtimes, and they were all identical.
Joined: May 02, 2007
LOL! Or maybe I should just build my project with mvn eclipse:eclipse -Dwtpversion=1.0 instead of just mvn eclipse:eclipse.
Hmmm..., I'm adding to this on the "better late than never" plan?!
I'm adding this response because I had the problem today. Googling led me to this answer, which seems to have pleased Matthew, but which didn't help me. I also found it either inadequately or not at all answered elsewhere. Here is my experience. I hope this will benefit someone; certainly it's worth a few bits and bytes of disk space to record it somewhere.
I have an Eclipse workspace with 5 projects. Two of them consume a Server. I needed to bump one of the two forward to Java 5 (at long last), but the other one needed to remain at Java 1.4 because it runs on NetWare (and though the Java 5 port was done and healthy, Novell refused to deliver it on their now more or less defunct platform). This second piece of information is obliquely related to this question.
The error I got in the Eclipse Problem tab of the workbench was:
Project facet java 5.0 is not supported by target runtime Apache Tomcat v5.5
The root of the problem appears to be that the Apache Tomcat v5.5 server set up in Eclipse had the JRE 1.4 in it (since I've long been running with the Java 1.4 requirement for the two projects in question and only just now am moving one of them forward).
To reach my successful solution, I followed these steps. This may be over-kill, but one of them along the way might be your problem:
0. I right=clicked on the project corresponding to the stated error. I chose Properties. Then I did the following
1. Expand Java Build Path; ensure the following under Libraries:
Apache Tomcat v5.5 [Apache Tomcat v5.5.]
JRE System Library [jdk1.5.0_17]
2. Expand Java Compiler; ensure that the compiler compliance level is set to 5.0.
3. Expand Server; ensure that "Tomcat v5.5 Server at localhost" is present. If not, this is created elsewhere in the Eclipse interface and I'm not going to show that here.
4. Expand Targeted Runtimes; ensure that "Apache Tomcat v5.5" is present. Click on it. In the Runtime Composition window (second window), you should see:
Apache Tomcat v5.5
JRE 5.0: jdk1.5.0_17 <-- this is where mine, which had been set up for Java 1.4, was wrong
5. Finally, open the Servers window, usually at the bottom pane of the workbench (along with the Problems window). There should be (corresponding to the expand Server property above) "Tomcat v5.5 Server at localhost". Click on that; note both
are present (the two projects using this server).
Later, you may need to re-set up a server for the other project which must continue to use JRE 1.4. You may need to create a second "Apache Tomcat v5.5 (2)" (thus named) and set inside it JRE 1.4. I did not have to do this. I'm getting away with this probably because my projects are complex enough that only one member of our development team has ever been successful at running (and debugging) under Eclipse control. Traditionally, everyone else has resorted to reading system log output from the two applications. I know this is lame, but for now, that's how it is.