struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell (JIRA)" <j...@apache.org>
Subject [jira] Closed: (WW-1765) struts.xml include dependant packages not loading properly
Date Mon, 19 Mar 2007 11:55:52 GMT

     [ https://issues.apache.org/struts/browse/WW-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Mitchell closed WW-1765.
------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 2.0.8)

Please do not open *new* issues to ask for an *existing* issue to be reopened.

Thanks

> struts.xml include dependant packages not loading properly
> ----------------------------------------------------------
>
>                 Key: WW-1765
>                 URL: https://issues.apache.org/struts/browse/WW-1765
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions
>    Affects Versions: 2.0.5
>            Reporter: Johnny
>            Priority: Critical
>
> === Essentially this is a request to re-open WW-1635 ===
> In "struts.xml" when I include "test.xml" that contains packages that extend the defined
pkg in "struts.xml" it is unable to resolve the parent package. 
> This happens as the application is initially started.
> This issue was detected in 2.0.5.
> The solution/workaround suggested in WW-1635 by Sebastien Poirier by modifying  com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.java
also solves my problem.
> ===========================
> struts.xml:
> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
> <struts>
> 	<constant name="struts.action.extension" value="action" />
>     <constant name="struts.enable.DynamicMethodInvocation" value="false" />
>     <package name="default" extends="struts-default">      
>         <interceptors>           
>             <interceptor-stack name="default">
>                 <interceptor-ref name="exception"/>
>                 <interceptor-ref name="alias"/>
>                 <interceptor-ref name="servlet-config"/>
>                 <interceptor-ref name="prepare"/>
>                 <interceptor-ref name="i18n"/>
>                 <interceptor-ref name="chain"/>
>                 <interceptor-ref name="model-driven"/>
>                 <interceptor-ref name="fileUpload"/>
>                 <interceptor-ref name="static-params"/>
>                 <interceptor-ref name="params"/>
>                 <interceptor-ref name="conversionError"/>
>                 <interceptor-ref name="workflow" />
>             </interceptor-stack>
>         </interceptors>       
>         <default-interceptor-ref name="default"/>        
>         <default-action-ref name="execute"/>               
>     </package>
>    
> 	<include file="test.xml"/>
>     
> </struts>
> ======
> Included test.xml
> <!DOCTYPE struts PUBLIC
>     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>     "http://struts.apache.org/dtds/struts-2.0.dtd">
> <struts>
>     <package name="test" extends="default">
>     	<action name="tester" class="TestAction" >
>    			<result name="success">WEB-INF/jsp/test.jsp</result>
> 	</action>
>     </package>
> </struts>
> ==================
> stack-trace: 
> SEVERE: Exception starting filter action
> Error building results for action editTest in namespace  - action - file:/D:/workspace/TheApp/web/WEB-INF/classes/test.xml:6:87
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:299)
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:384)
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
> 	at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
> 	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:274)
> 	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:396)
> 	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
> 	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> 	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:710)
> 	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:288)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: No result type specified for result named 'success', perhaps the parent package
does not specify the result type? - result - file:/D:/workspace/TheApp/web/WEB-INF/classes/test.xml:7:30
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:530)
> 	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:297)
> 	... 26 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message