struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurizio Cucchiara (JIRA)" <j...@apache.org>
Subject [jira] [Created] (WW-3616) Error in the detail view of the REST Showcase
Date Thu, 28 Apr 2011 10:06:03 GMT
Error in the detail view of the REST Showcase
---------------------------------------------

                 Key: WW-3616
                 URL: https://issues.apache.org/jira/browse/WW-3616
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - REST
    Affects Versions: 2.2.3
            Reporter: Maurizio Cucchiara


Invoking the detail view page [1] throws the following exception:

org.apache.struts2.rest.DefaultHttpHeaders cannot be cast to
java.lang.String

RequestURI=/struts2-rest-showcase/orders/3
Caused by:

java.lang.ClassCastException: org.apache.struts2.rest.DefaultHttpHeaders
cannot be cast to java.lang.String
       at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:462)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
       at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
       at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100)

This happens cause the RestActionProxyFactory uses the root ("/") as default namespace and
RestActionMapper maps this kind of action along the empty ("") namespace.

Adding the following xml code in the struts configuration file, could help (to be honest I
don't know if there are any side effects).

<constant name="struts.rest.namespace" value=""/>


[1] http://localhost:8080/struts2-rest-showcase/orders/3 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message