aspose file tools*
The moose likes Struts and the fly likes Loading struts-default.xml twice in separate web applications giving error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Loading struts-default.xml twice in separate web applications giving error" Watch "Loading struts-default.xml twice in separate web applications giving error" New topic
Author

Loading struts-default.xml twice in separate web applications giving error

V Satish Babu Rajana
Greenhorn

Joined: Oct 22, 2012
Posts: 1
Hi,

I have two separate web application developed using struts2, deployed in jboss4.2.3 server.

While starting the server i am getting below error for second application. if i removed the struts-lib from second application, deployment is working fine.

But i don't want both application's should have dependency of jar files. Since some times may be required to deployment one application or both. Accordingly i don't want to change my build scripts

Logs:
2012-10-22 18:43:08,223 ERROR [org.apache.struts2.dispatcher.Dispatcher] Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/D:/jboss-avalon/server/default/deploy/zcmc.ear/CertificateConsole.war/WEB-INF/lib/struts2-core-2.3.1.2.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3735)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5359)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)

Thanks,
R.V.Satish Babu
Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

this is likely because you are having multiple versions of same API like struts2-core-2.3.1.2.jar and struts2-core-2.1.6.jar check your libs


Learning some thing New Every Day
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading struts-default.xml twice in separate web applications giving error