You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Parag Mehta (JIRA)" <ji...@apache.org> on 2007/06/20 16:59:26 UTC
[jira] Created: (WW-2003) Startup/bean loading issue when
struts-default.xml in classpath other than jar.
Startup/bean loading issue when struts-default.xml in classpath other than jar.
-------------------------------------------------------------------------------
Key: WW-2003
URL: https://issues.apache.org/struts/browse/WW-2003
Project: Struts 2
Issue Type: Bug
Affects Versions: 2.0.6
Environment: Windows, Tomcat 5.5.
Reporter: Parag Mehta
The following issue is caused when struts-default.xml exists outside the jar ahead in the classpath (e.g. in the classes directory of the webapp). Fix for now is to remove the xml from classes directory, it has to be loaded from within the struts core jar.
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/<path hidden>/WEB-INF/lib/org.apache.struts-struts2-core-2.0.3.jar!/struts-default.xml:8:69
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:394)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-2003) Startup/bean loading issue when
struts-default.xml in classpath other than jar.
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-2003.
---------------------------------
Resolution: Incomplete
> Startup/bean loading issue when struts-default.xml in classpath other than jar.
> -------------------------------------------------------------------------------
>
> Key: WW-2003
> URL: https://issues.apache.org/struts/browse/WW-2003
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.0.6
> Environment: Windows, Tomcat 5.5.
> Reporter: Parag Mehta
> Fix For: Future
>
>
> The following issue is caused when struts-default.xml exists outside the jar ahead in the classpath (e.g. in the classes directory of the webapp). Fix for now is to remove the xml from classes directory, it has to be loaded from within the struts core jar.
> Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/<path hidden>/WEB-INF/lib/org.apache.struts-struts2-core-2.0.3.jar!/struts-default.xml:8:69
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209)
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:394)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
> at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2003) Startup/bean loading issue when
struts-default.xml in classpath other than jar.
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43943#action_43943 ]
Musachy Barroso commented on WW-2003:
-------------------------------------
If you extract struts-default.xml and still keep it on ther will be all kind of exceptions (duplicated bean definitions and such). Please post a full stacktrace, or give more details.
> Startup/bean loading issue when struts-default.xml in classpath other than jar.
> -------------------------------------------------------------------------------
>
> Key: WW-2003
> URL: https://issues.apache.org/struts/browse/WW-2003
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.0.6
> Environment: Windows, Tomcat 5.5.
> Reporter: Parag Mehta
> Fix For: Future
>
>
> The following issue is caused when struts-default.xml exists outside the jar ahead in the classpath (e.g. in the classes directory of the webapp). Fix for now is to remove the xml from classes directory, it has to be loaded from within the struts core jar.
> Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/<path hidden>/WEB-INF/lib/org.apache.struts-struts2-core-2.0.3.jar!/struts-default.xml:8:69
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209)
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:394)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
> at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2003) Startup/bean loading issue when
struts-default.xml in classpath other than jar.
Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Husted updated WW-2003:
---------------------------
Fix Version/s: Future
Setting Fix Version to "future" for issues without a set fix version.
> Startup/bean loading issue when struts-default.xml in classpath other than jar.
> -------------------------------------------------------------------------------
>
> Key: WW-2003
> URL: https://issues.apache.org/struts/browse/WW-2003
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.6
> Environment: Windows, Tomcat 5.5.
> Reporter: Parag Mehta
> Fix For: Future
>
>
> The following issue is caused when struts-default.xml exists outside the jar ahead in the classpath (e.g. in the classes directory of the webapp). Fix for now is to remove the xml from classes directory, it has to be loaded from within the struts core jar.
> Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/<path hidden>/WEB-INF/lib/org.apache.struts-struts2-core-2.0.3.jar!/struts-default.xml:8:69
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209)
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:394)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
> at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2003) Startup/bean loading issue when
struts-default.xml in classpath other than jar.
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43070#action_43070 ]
Don Brown commented on WW-2003:
-------------------------------
This is pretty weird... so you are saying that if you extract struts-default.xml to WEB-INF/classes then it breaks? The stacktrace you provide show the file being served from the jar. If the problem is that the struts-default.xml has to be loaded by the same _classloader_ as the Struts classes, well that is certainly the case.
> Startup/bean loading issue when struts-default.xml in classpath other than jar.
> -------------------------------------------------------------------------------
>
> Key: WW-2003
> URL: https://issues.apache.org/struts/browse/WW-2003
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.0.6
> Environment: Windows, Tomcat 5.5.
> Reporter: Parag Mehta
> Fix For: Future
>
>
> The following issue is caused when struts-default.xml exists outside the jar ahead in the classpath (e.g. in the classes directory of the webapp). Fix for now is to remove the xml from classes directory, it has to be loaded from within the struts core jar.
> Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/<path hidden>/WEB-INF/lib/org.apache.struts-struts2-core-2.0.3.jar!/struts-default.xml:8:69
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209)
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:394)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
> at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.