[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3915) RESTEasy GET request: java.lang.RuntimeException: Bad arguments passed to public java.lang.String method
Walter Barrow (JIRA)
jira-events at lists.jboss.org
Mon Apr 20 11:48:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-3915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12463209#action_12463209 ]
Walter Barrow commented on JBSEAM-3915:
---------------------------------------
What I meant by that was that I created an example that was "identical" to what was provided in the Seam 2.1.1.GA reference manual. I will include it here so you can see exactly what I am doing:
--------
Local:
package com.afscn.itapps.exws;
import javax.ejb.Local;
@Local
public interface DemoService
{
public String test();
}
--------
EJB:
package com.afscn.itapps.exws;
import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.ProduceMime;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import com.afscn.itapps.appsec.beans.session.AppUserManager;
@Stateless
@Name ( "demoService")
@Path("/users")
public class DemoServiceBean implements DemoService
{
@GET
@Path("/test")
@ProduceMime("text/plain")
public String test()
{
return "Hello, Walt! ";
}
}
-----------------------
Components.xml:
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:bpm="http://jboss.com/products/seam/bpm"
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:transaction="http://jboss.com/products/seam/transaction"
xmlns:persistence="http://jboss.com/products/seam/persistence"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:framework="http://jboss.com/products/seam/framework"
xmlns:async="http://jboss.com/products/seam/async"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ldap="http://afscn.com/itapps/seamext/ldap"
xmlns:seamext="http://afscn.com/itapps/seamext/security"
xmlns:wicket="http://jboss.com/products/seam/wicket"
xmlns:resteasy="http://jboss.com/products/seam/resteasy"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.1.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
http://jboss.com/products/seam/resteasy http://jboss.com/products/seam/resteasy-2.1.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
<!-- resteasy -->
<resteasy:application-config
resource-path-prefix="/restv1"
scan-providers="true"
scan-resources="true"
use-builtin-providers="true"/>
<!-- The root directory name for the jndi-pattern must match the EAR name
set in the POM -->
<core:init jndi-pattern="wsrest/#{ejbName}/local" debug="true"/>
<core:manager concurrent-request-timeout="500"
conversation-timeout="360000"
conversation-id-parameter="cid"/>
<persistence:managed-persistence-context name="entityManager" auto-create="true"
persistence-unit-jndi-name="java:/wsrestEntityManagerFactory"/>
<async:quartz-dispatcher/>
<security:identity authenticate-method="#{authenticator.authenticate}"/>
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>
</components>
------------
WEB.xml
<?xml version="1.0" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<!-- Listeners -->
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
<!-- Context parameters -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<!-- Filters -->
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Context parameters -->
<!-- Servlets -->
<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
</web-app>
-------------------
Invoking URL:
http://localhost:8080/wsrest/seam/resource/restv1/users/test (invoked from IE6)
----------------------------
Jars included in EAR:
jaxrs-api-2.1.1.GA.jar
jboss-el-2.1.1.GA.jar
jboss-seam-remoting-2.1.1.GA.jar
jboss-seam-resteasy-2.1.1.GA.jar
resteasy-jaxrs-2.1.1.GA.jar
wsrest-jar-1.0-DEV.jar (EJB jar)
wsrest-war-1.0-DEV.war (test war)
-----------------------------
Jars included in WAR:
commons-beanutils-2.1.1.GA.jar
jboss-seam-debug-2.1.1.GA.jar
urlrewritfilter-2.1.1.GA.jar
I hope this helps! If you need more information, let me know.
Thanks!
Walt Barrow
> RESTEasy GET request: java.lang.RuntimeException: Bad arguments passed to public java.lang.String method
> ---------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-3915
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3915
> Project: Seam
> Issue Type: Bug
> Components: WS
> Affects Versions: 2.1.1.GA
> Environment: JDK 1.6
> Jboss 5.0.0.GA for JDK 1.6
> Seam 2.1.1.GA
> Reporter: Viggo Navarsete
> Assignee: Christian Bauer
> Priority: Blocker
> Fix For: 2.1.2.CR2
>
>
> Deploying the attached project and going to the following url: http://localhost:8080/app-cci-seam/seam/resource/rest/gqiResource/getShelfLife/arg1/arg2
> results in the following stacktrace:
> 09:00:03,046 ERROR [STDERR] java.lang.RuntimeException: Bad arguments passed to public java.lang.String com.tracetracker.cci.session.GqiResourceBean.getShelfLife(java.lang.String,java.lang.String) ( arg1, arg2
> 09:00:03,047 ERROR [STDERR] at org.resteasy.MethodInjectorImpl.invoke(MethodInjectorImpl.java:133)
> 09:00:03,047 ERROR [STDERR] at org.resteasy.ResourceMethod.invoke(ResourceMethod.java:162)
> 09:00:03,047 ERROR [STDERR] at org.resteasy.ResourceMethod.invoke(ResourceMethod.java:134)
> 09:00:03,047 ERROR [STDERR] at org.resteasy.Dispatcher.invoke(Dispatcher.java:161)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.resteasy.ResteasyResourceAdapter$1.process(ResteasyResourceAdapter.java:127)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.resteasy.ResteasyResourceAdapter.getResource(ResteasyResourceAdapter.java:71)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80)
> 09:00:03,047 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 09:00:03,047 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 09:00:03,047 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
> 09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> 09:00:03,047 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
> 09:00:03,048 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
> 09:00:03,048 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
> 09:00:03,048 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
> 09:00:03,048 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
> 09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> 09:00:03,048 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
> 09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> 09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
> 09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
> 09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
> 09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
> 09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 09:00:03,048 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 09:00:03,049 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
> 09:00:03,049 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 09:00:03,049 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
> 09:00:03,049 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
> 09:00:03,049 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
> 09:00:03,049 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 09:00:03,049 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
> 09:00:03,049 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
> 09:00:03,049 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 09:00:03,049 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 09:00:03,049 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 09:00:03,049 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
> 09:00:03,049 ERROR [STDERR] at org.resteasy.MethodInjectorImpl.invoke(MethodInjectorImpl.java:72)
> 09:00:03,049 ERROR [STDERR] ... 50 more
> The interface for the RESTEasy webservice is com.tracetracker.cci.GqiResource
> The implementation is com.tracetracker.cci.GqiResourceBean
> I have tried to change the parameter types resulting in the same error. It looks the argumentss are not handlet corectly for GET requests.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list