We are in the process of enhancing an existing struts 1 application with new functionality that uses struts 2.
We are seeing the following errors. Can someone help?
Thanks,
Kunal
Unable to load configuration. - package - file:/c:/clients/PSWD/eclipse/msc_workspace/PSWDBase/WebContent/WEB-INF/classes/struts.xml:14:71
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: The package name 'com.mccamish.actions.rpm' at location package - file:/c:/clients/PSWD/eclipse/msc_workspace/PSWDBase/WebContent/WEB-INF/classes/struts.xml:14:71 is already been used by another package at location package - file:/C:/clients/PSWD/eclipse/msc_workspace/PSWDBase/WebContent/WEB-INF/classes/struts.xml:14:71 - package - file:/c:/clients/PSWD/eclipse/msc_workspace/PSWDBase/WebContent/WEB-INF/classes/struts.xml:14:71
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.addPackageConfig(DefaultConfiguration.java:113)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:467)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 22 more
And you're sure it's not being deployed twice somewhere/how?
Kunal Sathe
Ranch Hand
Joined: Apr 08, 2005
Posts: 48
posted
0
Yes David. I am sure it is not being deployed twice. However, I must tell you that parts of this project use struts 1 while some parts use struts 2
Do you think this may have to do with having some unnecessary jar files in the build path?
I don't think so, although I've never done that in real life.
The other thing that confuses me is the error message itself... did you try just using "spring" as the object factory name? I'm wondering if it's a Spring config issue, since the package name in the error doesn't even appear in the struts.xml file.
Kunal Sathe
Ranch Hand
Joined: Apr 08, 2005
Posts: 48
posted
0
David, sorry about the confusion. The latest version of the struts.xml file does have the package name in it.