MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
View previous topic Printable version Log in to check your private messages View next topic
Author Message
unmeshdev
Post subject: Tomcat question - Excluding xerces jars at deployment  PostPosted: Jun 10, 2012 - 09:14 AM
Registered Member
Registered Member


Joined: Mar 16, 2008
Posts: 8

Hi,

What is the right way to tell MyEclipse to not include specific jar files in the WEB-INF of the web application during deployment?

I am getting a deployment error for a Struts 2 application in Tomcat 5.5. I am using Java 1.6.0_26 and MyEclipse 9. Please see stack track extracts at the end of this message.

This problem seems to come because of the conflicts between different Xerces versions. The solution is to not include the xerces and xml-api jars in the application's WEB-INF. This works fine when I deploy in Tomcat externally.

However, when I deploy to Tomcat through MyEclipse by using the "Manage Deployments" functionality, MyEclipse includes the Xerces and other jar files in the WEB-INF of the web application, causing the conflict.

So I need a mechanism to tell MyEclipse to not include these specific jars in the WEB-INF of the web application. How can I do that?

Note that these specific jars are included as "External Jars" in the build path ("Libraries" tab). They are deselected in the "Order and Export" tab.

Thanks in advance.
Unmesh


Stack trace:
Quote:
SEVERE: Dispatcher initialization failed
Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)


This can be traced to the following exception:

... 17 more
Quote:
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jun 11, 2012 - 07:10 AM



Joined: Nov 11, 2010
Posts: 2491

unmeshdev,

You can have the libraries that you want to omit on the project build path. You can then go to Windows > Pref > MyEclipse > Java Enterprise Project > Web Project > Deployment and uncheck "JARS on web-project build path" under library deployment policy.

The libraries that you want to deploy can be placed in a user library and the user library can be added to the project.

You can check this tutorial for detailed information of deployment policies :
http://www.myeclipseide.com/documentation/quickstarts/webprojects/index.html#external_libraries

Let us know how it works for you.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits