You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alex xander <xa...@yahoo.com> on 2007/02/26 07:31:03 UTC
struts.xml problem
hi, im using struts 2.x
and i have some problem here.
i break up my struts.xml into smaller piece
when i used struts 2.0.1 it works fine,
but when i change into struts 2.0.6 there is some problem
and here is the problem
my struts.xml
<struts>
<include file="struts-default.xml"/>
<package name="default" extends="struts-default">
.......
</package>
<include file="struts-pensiun.xml"/>
</struts>
struts-pensiun.xml
<struts>
<package name="jangkawaktu" extends="default" namespace="/backend/parameter/jangkawaktu">
<action name="create" class="com.bba.parameter.jangkawaktu.actions.JangkaWaktuForm">
<result name="success" type="velocity">save.vm</result>
<result name="error" type="velocity">../../error.vm</result>
</action>
</package>
</struts>
and here is the error
[ERROR] ConfigurationUtil - Unable to find parent package default
[ERROR] XmlConfigurationProvider - Unable to find parent packages default
[ERROR] pensiun] - Exception starting filter struts <Error building results for
action save in namespace /backend/parameter/jangkawaktu - action - file:/E:/data
%20kerja/tomcat-pensiunan/webapps/pensiun/WEB-INF/classes/struts-pensiun.xml:14:
91>Error building results for action save in namespace /backend/parameter/jangka
waktu - action - file:/E:/data%20kerja/tomcat-pensiunan/webapps/pensiun/WEB-INF/
classes/struts-pensiun.xml:14:91
i can't resolve the problem, why my struts-pensiun.xml can't find the default package.
is there something i miss
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
Re: struts.xml problem
Posted by Niklas Herder <he...@dsv.su.se>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This is due to a bug in xwork2:
https://issues.apache.org/struts/browse/WW-1635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39748
Adam Ruggles skrev:
> Can you confirm that you have struts2-core-2.0.6.jar in you lib folder
> and it contains the struts-default.xml file in the root folder in the
> jar file.
>
> alex xander wrote:
>> hi, im using struts 2.x
>> and i have some problem here.
>> i break up my struts.xml into smaller piece
>> when i used struts 2.0.1 it works fine,
>> but when i change into struts 2.0.6 there is some problem
>> and here is the problem
>> my struts.xml
>> <struts>
>> <include file="struts-default.xml"/>
>> <package name="default" extends="struts-default">
>> .......
>> </package>
>> <include file="struts-pensiun.xml"/>
>> </struts>
>>
>> struts-pensiun.xml
>>
>> <struts>
>> <package name="jangkawaktu" extends="default"
>> namespace="/backend/parameter/jangkawaktu">
>> <action name="create"
>> class="com.bba.parameter.jangkawaktu.actions.JangkaWaktuForm">
>> <result name="success" type="velocity">save.vm</result>
>> <result name="error"
>> type="velocity">../../error.vm</result>
>> </action>
>> </package>
>> </struts>
>>
>> and here is the error
>>
>> [ERROR] ConfigurationUtil - Unable to find parent package default
>> [ERROR] XmlConfigurationProvider - Unable to find parent packages default
>> [ERROR] pensiun] - Exception starting filter struts <Error building
>> results for
>> action save in namespace /backend/parameter/jangkawaktu - action -
>> file:/E:/data
>> %20kerja/tomcat-pensiunan/webapps/pensiun/WEB-INF/classes/struts-pensiun.xml:14:
>>
>> 91>Error building results for action save in namespace
>> /backend/parameter/jangka
>> waktu - action -
>> file:/E:/data%20kerja/tomcat-pensiunan/webapps/pensiun/WEB-INF/
>> classes/struts-pensiun.xml:14:91
>>
>> i can't resolve the problem, why my struts-pensiun.xml can't find the
>> default package.
>> is there something i miss
>>
>>
>> ---------------------------------
>> Don't pick lemons.
>> See all the new 2007 cars at Yahoo! Autos.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
- --
Niklas Herder
Stockholms Universitet
Institutionen för data- och systemvetenskap
Forum 100
SE-164 40 KISTA
SWEDEN
+46(0)8-161438
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGEp6W1wuvxhRaYCkRAozSAKDny2qT3IPCDK5Cx25mNgjQA3xD0gCgwwu3
hrWP+gjG4/mvlhIfVozLyrs=
=5eom
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts.xml problem
Posted by Philip Lorenz <ph...@gmx.net>.
> for sure, i already put struts2-core-2.0.6.jar in my lib folder
> and inside that, there is struts-default.xml in the root folder
> if i remove my struts-pensiun.xml and put into just struts.xml
> everything work fine.
> is there any bug in this release.
> thx
>
This seems to be a problem in Struts (I have encountered exactly the same problem).
If you put the contents of of your struts.xml into another file (let's say struts-site.xml) and include that from struts.xml before the other configuration file the package is picked up correctly.
I guess that the configuration data isn't exported by the config loader before another external file is included.
If my workaround works for you I suggest posting a bug report.
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts.xml problem
Posted by alex xander <xa...@yahoo.com>.
for sure, i already put struts2-core-2.0.6.jar in my lib folder
and inside that, there is struts-default.xml in the root folder
if i remove my struts-pensiun.xml and put into just struts.xml
everything work fine.
is there any bug in this release.
thx
Adam Ruggles <a....@gmail.com> wrote: Can you confirm that you have struts2-core-2.0.6.jar in you lib folder
and it contains the struts-default.xml file in the root folder in the
jar file.
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
Re: struts.xml problem
Posted by Adam Ruggles <a....@gmail.com>.
Can you confirm that you have struts2-core-2.0.6.jar in you lib folder
and it contains the struts-default.xml file in the root folder in the
jar file.
alex xander wrote:
> hi, im using struts 2.x
> and i have some problem here.
> i break up my struts.xml into smaller piece
> when i used struts 2.0.1 it works fine,
> but when i change into struts 2.0.6 there is some problem
> and here is the problem
> my struts.xml
> <struts>
> <include file="struts-default.xml"/>
> <package name="default" extends="struts-default">
> .......
> </package>
> <include file="struts-pensiun.xml"/>
> </struts>
>
> struts-pensiun.xml
>
> <struts>
> <package name="jangkawaktu" extends="default" namespace="/backend/parameter/jangkawaktu">
> <action name="create" class="com.bba.parameter.jangkawaktu.actions.JangkaWaktuForm">
> <result name="success" type="velocity">save.vm</result>
> <result name="error" type="velocity">../../error.vm</result>
> </action>
> </package>
> </struts>
>
> and here is the error
>
> [ERROR] ConfigurationUtil - Unable to find parent package default
> [ERROR] XmlConfigurationProvider - Unable to find parent packages default
> [ERROR] pensiun] - Exception starting filter struts <Error building results for
> action save in namespace /backend/parameter/jangkawaktu - action - file:/E:/data
> %20kerja/tomcat-pensiunan/webapps/pensiun/WEB-INF/classes/struts-pensiun.xml:14:
> 91>Error building results for action save in namespace /backend/parameter/jangka
> waktu - action - file:/E:/data%20kerja/tomcat-pensiunan/webapps/pensiun/WEB-INF/
> classes/struts-pensiun.xml:14:91
>
> i can't resolve the problem, why my struts-pensiun.xml can't find the default package.
> is there something i miss
>
>
> ---------------------------------
> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
STRUTS 2.0.6 struts.xml problem
Posted by alex xander <xa...@yahoo.com>.
why in struts 2.0.6 i can't extends package from the other file?
for example i have package name = default in struts.xml
in struts.xml i include file struts-xxx.xml
in struts-xxx.xml i want to extend default package but it's error
in struts 2.0.1 it work fine
can any one tell me why
---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.