History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1402
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Sohel Katchi
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
WebWork

Action entry in xwork.xml not being read correctly.

Created: 19/Dec/06 06:28 PM   Updated: 04/Feb/07 03:53 PM
Component/s: Actions, Configuration
Affects Version/s: 2.2.4
Fix Version/s: 2.2.5

File Attachments: 1. Java Source File DiaryAction.java (0.7 kb)
2. XML File profile_management.xml (16 kb)
3. XML File xwork.xml (1 kb)

Image Attachments:

1. config-browser shows wrong success entry.jpg
(187 kb)
Environment: Using Tomcat 5.5 and Weblogic 8.1 SP4 to deploy web app.
Issue Links:
Duplicate
This issue duplicates:
XW-457 XWork throws random NPE's Major Resolved
 
Related
 
This issue is related to:
XW-412 Some XMLParsers parse the xwork confi... Critical Closed

Flags: Important


 Description  « Hide
I am experiencing a problem with my web application when it reads the xwork.xml file.

I have the following entry in my xwork.xml file:
 <action name="DiarySetupAddDaily"
                class="com.xxx.controller.DiaryAction"
                method="addDaily">
            <result name="success" type="dispatcher">profile_management/diary/message.jsp</result>
            <result name="error" type="dispatcher">shared/error.jsp</result>
        </action>

If I try to go to /DiarySetupAddDaily.action I get a 404 not found error and then it says "result (null) not found."

I load up the config-browser by enabling it in the xwork.xml
<xwork>
...
 <include file="config-browser.xml"/>
...
</xwork>

When I look at the details for the action, it also shows a NULL entry for the "SUCCESS" result:

Action information
Action information - DiarySetupAddDaily
Action name: DiarySetupAddDaily
Namespace:
Action class: com.jpmorgan.gcrm.clive.profile.controller.DiaryAction
Action method: addDaily
Parameters:
Default location: /clive/DiarySetupAddDaily.action
Results

Name: error Type: com.opensymphony.webwork.dispatcher.ServletDispatcherResult Parameters: location = shared/error.jsp
Name: success Type: com.opensymphony.webwork.dispatcher.ServletDispatcherResult Parameters:


Apart from that bug, I try to move the action entry further down in my xwork.xml and it worked! The config-browser correctly picked up the SUCCESS entry as I specified in my xwork.xml. HOWEVER, another action entry was read incorrectly (the SUCCESS result reads in as NULL instead of the one specified in the XML).

There is no consistency in which action entries fail to load correctly, I'm completely stumped on how this could actually happen.

 All   Comments   Change History      Sort Order:
Sohel Katchi - [19/Dec/06 06:31 PM ]
xwork.xml file

Sohel Katchi - [19/Dec/06 06:31 PM ]
included from xwork.xml

Sohel Katchi - [19/Dec/06 06:35 PM ]
Action class

Philip Luppens - [30/Jan/07 04:10 AM ]
Hey Sohel, could you reply on the forum again to see if a) revision 1124 or higher or b) Toby's patch has resolved your issue ? I cannot reproduce the situation as you describe above (well, I can, but only using revision 1122, and normally, you should not have that one).

I would really like to see this resolved.

Sohel Katchi - [30/Jan/07 10:39 AM ]
Hi Phillip, I'll give it a try today.

Thanks,

Sohel

Philip Luppens - [31/Jan/07 09:26 AM ]
Issue appears to be fixed in the repository. Thanks Don and Toby.