Eclipse IDE – Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules
Problem
Import a Java web project in Eclipse, build with Maven, once create a Tomcat server instance, unable to add the Java web project, and showing
Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules
Tools used :
- Eclipse Juno 4.2
- Tomcat 6.0.35
- JDK 1.6
Solution
In project, “.settings” folder, find this file “org.eclipse.wst.common.project.facet.core.xml“, change the version of facet="jst.web"
to 2.4 or 2.5.
File : org.eclipse.wst.common.project.facet.core.xml
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="jst.java"/>
<fixed facet="jst.web"/>
<installed facet="jst.web" version="2.4"/>
<installed facet="jst.java" version="6.0"/>
</faceted-project>
Tomcat 7
You need
You need
facet="jst.web" version="3.0"
to deploy on Tomcat 7.
Thank you very much, you saved me a few day’s work of debugging.
It is working well for me. Thanks for your tips.
still not working
THANKS SO MUCH DUDE¡¡
Muchas gracias!
The solution worked for me.
Thanks mkyong..!!!!
Thank you very much Problm solved…
Thank you! It worked 🙂
There is another case that error could happen : when project is java 6+ and tomcat runtime configured to run with jre 5. Changing configuration of the jre in the tomcat runtime configuration to jre6 or greater solve the problem in this case.
i got the same error , tried the solution did not work … using Spring STS 3.6.3 , is there something to do with the version of IDE
Thanks, problem solved.
Wonderful, thank you. None other “answers” even mention facets or ‘jst.web’ – Great Job!
Thnx …It helps me alot..
Works Great.
It worked correctly. Thanks.
Thanks. Your fix did the trick!
Thanks, problem solved.
Thank you very much. Seems like you have the answers for most of my problems. Your work is greatly appreciated!
Hi, how can I automate this by just using the mvn clipse:eclipse -Dwtpversion=X.X ? I don’t want to have “extra configurations” besides that command. Is this possible ?
thanks!
Struts2 tiles application runs fine in eclipse helios. When opened with eclipse Juno it gives exception:
Juno downloaded from here.
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR1/eclipse-jee-juno-SR1-win32.zip&url=http://mirror.yongbok.net/eclipse//technology/epp/downloads/release/juno/SR1/eclipse-jee-juno-SR1-win32.zip&mirror_id=1078
Exception here. Tomcat version 6.
Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor – interceptor – jar:file:/C:/Users/Zafar%20Anwar/workspaceStruts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Lab11Book(Struts2Tiles2Example)/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:98:115
at org.apache.struts2.impl.StrutsObjectFactory.buildInterceptor(StrutsObjectFactory.java:78)
at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:57)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:905)
Could you please let me know what could be the reason and how to fix it?
Thanks so much!
I was able to get rid of this problem,Thanks for this post.
I have the same error. tomcat7 works but it runs in outofmemory errors since my app is huge, but I want to make it work for tomcat 6.
I don’t have a file by name ‘org.eclipse.wst.common.project.facet.core.xml’ in the .settigns folder. Am I missing something, I do have Eclipse Juno.
Thanks! good tip to step over this IDE limitation.
Works!
But actually you may change “Dynamic Web Module” by right click on the project->Properties->Project Facets
No, that option is disabled, unable to change. I have to update the XML file manually.
Thanks that got me out of a jam!!!