Re: [Resteasy-users] ResteasyWebTarget target proxy fails

2014-03-10 Thread Bill Burke
And what is your client proxy class?  You can only pass in an interface 
you know, right?

On 3/10/2014 7:07 AM, Wessel Pieterse wrote:
> Hi
>
> Thank you for the response!
>
> I added a code snippet of the class here :
> https://gist.github.com/jimfromsa/fc88297bf5aca811eba8 . I just removed
> some of the more sensitive stuff.
>
> Kind Regards
>
>
> On Fri, Mar 7, 2014 at 12:32 AM, Anthony Whitford  > wrote:
>
> I suspect there is an issue with the TokenEndpoint class. Can you
> provide the interface definition?
>
>
>  > On Mar 5, 2014, at 5:24 AM, Wessel Pieterse
> mailto:wes...@ordercloud.co.za>> wrote:
>  >
>  > HI
>  >
>  >
>  >
>  > Was wondering if soemone has any advice for the following?
>  >
>  > Im using Resteasy 3.0.6.Final. Jboss Wildfly.
>  >
>  > ResteasyWebTarget target = client.target(contextPath +
> RESOURCE_PREFIX);
>  > tokenEndpoint = target.proxy(TokenEndpoint.class);
>  >
>  > fails when trying to proxy the class:
>  >
>  > Here is my error :
>  >
>  > java.lang.RuntimeException: You must use at least one, but no
> more than one http method annotation on: public final void
> java.lang.Object.wait(long,int) throws java.lang.InterruptedException
>  >   at
> 
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.createClientInvoker(ProxyBuilder.java:76)
>  >   at
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.proxy(ProxyBuilder.java:52)
>  >   at
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.build(ProxyBuilder.java:120)
>  >   at
> 
> org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.proxy(ClientWebTarget.java:72)
>  >   at
> 
> com.unijunction.ordercloud.security.oauth.rest.TokenEndpointTest.setUp(TokenEndpointTest.java:107)
>  >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  >   at
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  >   at
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  >   at
> 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>  >   at
> 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>  >   at
> 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>  >   at
> 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>  >   at
> 
> org.jboss.arquillian.junit.Arquillian$StatementLifecycleExecutor.invoke(Arquillian.java:351)
>  >   at
> 
> org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
>  >   at
> 
> org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
>  >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  >   at
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  >   at
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
>  >   at
> 
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
>  >   at
> 
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
>  >   at
> 
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
>  >   at
> 
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
>  >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  >   at
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  >   at
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
>  >   at
> 
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
>  >   at
> 
> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
>  >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  >   at
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  >   at
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl

Re: [Resteasy-users] ResteasyWebTarget target proxy fails

2014-03-10 Thread Wessel Pieterse
Hi

Thank you for the response!

I added a code snippet of the class here :
https://gist.github.com/jimfromsa/fc88297bf5aca811eba8 . I just removed
some of the more sensitive stuff.

Kind Regards


On Fri, Mar 7, 2014 at 12:32 AM, Anthony Whitford wrote:

> I suspect there is an issue with the TokenEndpoint class. Can you provide
> the interface definition?
>
>
> > On Mar 5, 2014, at 5:24 AM, Wessel Pieterse 
> wrote:
> >
> > HI
> >
> >
> >
> > Was wondering if soemone has any advice for the following?
> >
> > Im using Resteasy 3.0.6.Final. Jboss Wildfly.
> >
> > ResteasyWebTarget target = client.target(contextPath + RESOURCE_PREFIX);
> > tokenEndpoint = target.proxy(TokenEndpoint.class);
> >
> > fails when trying to proxy the class:
> >
> > Here is my error :
> >
> > java.lang.RuntimeException: You must use at least one, but no more than
> one http method annotation on: public final void
> java.lang.Object.wait(long,int) throws java.lang.InterruptedException
> >   at
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.createClientInvoker(ProxyBuilder.java:76)
> >   at
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.proxy(ProxyBuilder.java:52)
> >   at
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.build(ProxyBuilder.java:120)
> >   at
> org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.proxy(ClientWebTarget.java:72)
> >   at
> com.unijunction.ordercloud.security.oauth.rest.TokenEndpointTest.setUp(TokenEndpointTest.java:107)
> >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >   at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> >   at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> >   at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> >   at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> >   at
> org.jboss.arquillian.junit.Arquillian$StatementLifecycleExecutor.invoke(Arquillian.java:351)
> >   at
> org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
> >   at
> org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
> >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >   at
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> >   at
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> >   at
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
> >   at
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
> >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >   at
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >   at
> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
> >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >   at
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >   at
> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
> >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >   at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >   at
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >   at
> org

Re: [Resteasy-users] ResteasyWebTarget target proxy fails

2014-03-06 Thread Anthony Whitford
I suspect there is an issue with the TokenEndpoint class. Can you provide the 
interface definition?


> On Mar 5, 2014, at 5:24 AM, Wessel Pieterse  wrote:
> 
> HI
> 
> 
> 
> Was wondering if soemone has any advice for the following?
> 
> Im using Resteasy 3.0.6.Final. Jboss Wildfly. 
> 
> ResteasyWebTarget target = client.target(contextPath + RESOURCE_PREFIX);
> tokenEndpoint = target.proxy(TokenEndpoint.class);
> 
> fails when trying to proxy the class:
> 
> Here is my error :
> 
> java.lang.RuntimeException: You must use at least one, but no more than one 
> http method annotation on: public final void java.lang.Object.wait(long,int) 
> throws java.lang.InterruptedException
>   at 
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.createClientInvoker(ProxyBuilder.java:76)
>   at 
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.proxy(ProxyBuilder.java:52)
>   at 
> org.jboss.resteasy.client.jaxrs.ProxyBuilder.build(ProxyBuilder.java:120)
>   at 
> org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.proxy(ClientWebTarget.java:72)
>   at 
> com.unijunction.ordercloud.security.oauth.rest.TokenEndpointTest.setUp(TokenEndpointTest.java:107)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>   at 
> org.jboss.arquillian.junit.Arquillian$StatementLifecycleExecutor.invoke(Arquillian.java:351)
>   at 
> org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
>   at 
> org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at 
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
>   at 
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
>   at 
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
>   at 
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
>   at 
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at 
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
>   at 
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
>   at 
> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at 
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
>   at 
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
>   at 
> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at 
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
>   at 
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
>   at 
> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth

[Resteasy-users] ResteasyWebTarget target proxy fails

2014-03-06 Thread Wessel Pieterse
HI



Was wondering if soemone has any advice for the following?

Im using Resteasy 3.0.6.Final. Jboss Wildfly.

ResteasyWebTarget target = client.target(contextPath + RESOURCE_PREFIX);
tokenEndpoint = target.proxy(TokenEndpoint.class);

fails when trying to proxy the class:

Here is my error :

java.lang.RuntimeException: You must use at least one, but no more than one
http method annotation on: public final void
java.lang.Object.wait(long,int) throws java.lang.InterruptedException
at
org.jboss.resteasy.client.jaxrs.ProxyBuilder.createClientInvoker(ProxyBuilder.java:76)
at org.jboss.resteasy.client.jaxrs.ProxyBuilder.proxy(ProxyBuilder.java:52)
at org.jboss.resteasy.client.jaxrs.ProxyBuilder.build(ProxyBuilder.java:120)
at
org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.proxy(ClientWebTarget.java:72)
at
com.unijunction.ordercloud.security.oauth.rest.TokenEndpointTest.setUp(TokenEndpointTest.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.jboss.arquillian.junit.Arquillian$StatementLifecycleExecutor.invoke(Arquillian.java:351)
at
org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
at
org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at
org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at
org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
at
org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at
org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at
org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at
org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at
org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)
at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:222)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
at org.jboss.arqui