File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Project facet Java 5.0 is not supported by target runtime Apache Tomcat v5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Project facet Java 5.0 is not supported by target runtime Apache Tomcat v5.5" Watch "Project facet Java 5.0 is not supported by target runtime Apache Tomcat v5.5" New topic
Author

Project facet Java 5.0 is not supported by target runtime Apache Tomcat v5.5

Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
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.
Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
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?
Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
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.
Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
LOL! Or maybe I should just build my project with mvn eclipse:eclipse -Dwtpversion=1.0 instead of just mvn eclipse:eclipse.
Russell Bateman
Ranch Hand

Joined: Feb 26, 2008
Posts: 69
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

project1
project2

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.
vartika vaish
Greenhorn

Joined: Apr 15, 2008
Posts: 15
Hi Russell,

It totally helped me.

Thank you so so very much.

Hani Ksd
Greenhorn

Joined: Jun 05, 2009
Posts: 2
thanks russel,it helped me too..
Vincent O'Sullivan
Greenhorn

Joined: Sep 04, 2002
Posts: 4
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


Thanks Russel,

Step four cured my problem. I had imported the project which had been developed on a PC using an older version of Tomcat (that I don't have). Clicking the right version, here, fixed it.

Vince.
Rajul Konkar
Greenhorn

Joined: Nov 05, 2008
Posts: 20

Thanks Russel,

It solved my problem too, within 15 min.

Rajul konkar.


Only pioneer take the untraveled path

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Project facet Java 5.0 is not supported by target runtime Apache Tomcat v5.5