Discussion:
[JAX-RS] error in start up server
ced_benoit
2013-06-24 15:26:42 UTC
Permalink
Hi,

when I start the server where I have the webservice JAX-RS, I have this
exception comes:

SEVERE: error invoking
org.apache.openejb.observer.ObserverManager$***@152424eb
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
at org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
... 27 more

I checkad again annontations in the service webservice, but I don't find
what is wrong!

Thank you for your help!

Cedirc





--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Sent from the cxf-user mailing list archive at Nabble.com.
Sergey Beryozkin
2013-06-24 16:00:53 UTC
Permalink
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.

What JAX-RS context do you try to inject ?

Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have this
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
at org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
... 27 more
I checkad again annontations in the service webservice, but I don't find
what is wrong!
Thank you for your help!
Cedirc
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Sent from the cxf-user mailing list archive at Nabble.com.
ced_benoit
2013-06-28 09:51:24 UTC
Permalink
Hi Sergey,

When you say: "What JAX-RS context do you try to inject ?", It means to
use annotation @Context? For exemple, in my class , I have this:

@Path("TestRest")
public class TestRest {

@GET
@Path("/findId/{id}")
@Produces("application/json")
public Response findId(@PathParam("id") Integer pID) {
...
}
}
Which kind of context, i can inject in a simple case?

thank you for you help!

Cedric


2013/6/24 Sergey Beryozkin [via CXF] <
Post by Sergey Beryozkin
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.
What JAX-RS context do you try to inject ?
Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have this
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Post by ced_benoit
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Post by ced_benoit
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
Post by ced_benoit
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
Post by ced_benoit
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
Post by ced_benoit
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
Post by ced_benoit
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
Post by ced_benoit
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
Post by ced_benoit
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Post by ced_benoit
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Post by ced_benoit
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Post by ced_benoit
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
Post by ced_benoit
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
Post by ced_benoit
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
Post by ced_benoit
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
Post by ced_benoit
at org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
Post by ced_benoit
... 27 more
I checkad again annontations in the service webservice, but I don't find
what is wrong!
Thank you for your help!
Cedirc
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
------------------------------
If you reply to this email, your message will be added to the discussion
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5729733.html
To unsubscribe from [JAX-RS] error in start up server, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729730&code=Y2VkLmJlbm9pdEBnbWFpbC5jb218NTcyOTczMHwxMDYyOTEyMjQw>
.
NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730060.html
Sent from the cxf-user mailing list archive at Nabble.com.
Sergey Beryozkin
2013-06-28 10:28:30 UTC
Permalink
Hi Cedric
Post by ced_benoit
Hi Sergey,
When you say: "What JAX-RS context do you try to inject ?", It means to
@Path("TestRest")
public class TestRest {
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
}
}
Which kind of context, i can inject in a simple case?
Did you get the issue resolved ? The exception trace led me to believe
that the runtime was trying to create a thread local proxy which would
done when you have something like this:

@Path("TestRest")
public class TestRest {

@Context
private UriInfo uriOnfo;

@GET
@Path("/findId/{id}")
@Produces("application/json")
public Response findId(@PathParam("id") Integer pID) {
}

}

assuming TestRest is a singleton class.

Can you have a context like UriInfo injected this way and then accessed
from a method like findId() ?

Sergey
Post by ced_benoit
thank you for you help!
Cedric
2013/6/24 Sergey Beryozkin [via CXF] <
Post by Sergey Beryozkin
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.
What JAX-RS context do you try to inject ?
Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have this
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Post by ced_benoit
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Post by ced_benoit
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
Post by ced_benoit
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
Post by ced_benoit
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
Post by ced_benoit
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
Post by ced_benoit
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
Post by ced_benoit
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
Post by ced_benoit
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Post by ced_benoit
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Post by ced_benoit
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Post by ced_benoit
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
Post by ced_benoit
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
Post by ced_benoit
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
Post by ced_benoit
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
Post by ced_benoit
at org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
Post by ced_benoit
... 27 more
I checkad again annontations in the service webservice, but I don't find
what is wrong!
Thank you for your help!
Cedirc
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
------------------------------
If you reply to this email, your message will be added to the discussion
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5729733.html
To unsubscribe from [JAX-RS] error in start up server, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729730&code=Y2VkLmJlbm9pdEBnbWFpbC5jb218NTcyOTczMHwxMDYyOTEyMjQw>
.
NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730060.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com
ced_benoit
2013-06-28 15:02:18 UTC
Permalink
Hi Sergey,

No the problem is not resolved and I am new in JAX-RS. I have add your
exemple:

@Context
private UriInfo uriOnfo;

in the class TestRest,

@Path("TestRest")
public class TestRest {

@Context
private UriInfo uriOnfo;

@Context

*ublic* *void* setUriInfo(UriInfo ui)

{

*this*.uriOnfo = ui;

}

*public* *void* setUriInfo(UriInfo ui)

{

*this*.uriOnfo = ui;

}

@GET
@Path("/findId/{id}")
@Produces("application/json")
public Response findId(@PathParam("id") Integer pID) {
...

return Response.*ok*("test").build();

}
}

and the problem isn't resolved. When you say:

"Can you have a context like UriInfo injected this way and then accessed
from a method like findId() ?" It mean that a @context must pass to the
method finId() likie this:

public Response findId(@Context contex, @PathParam("id") Integer pID)

Thank you for your help

Cedric



2013/6/28 Sergey Beryozkin [via CXF] <
Post by Sergey Beryozkin
Hi Cedric
Post by ced_benoit
Hi Sergey,
When you say: "What JAX-RS context do you try to inject ?", It means to
@Path("TestRest")
public class TestRest {
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
}
}
Which kind of context, i can inject in a simple case?
Did you get the issue resolved ? The exception trace led me to believe
that the runtime was trying to create a thread local proxy which would
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
@GET
@Path("/findId/{id}")
@Produces("application/json")
}
}
assuming TestRest is a singleton class.
Can you have a context like UriInfo injected this way and then accessed
from a method like findId() ?
Sergey
Post by ced_benoit
thank you for you help!
Cedric
2013/6/24 Sergey Beryozkin [via CXF] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5730067&i=0>>
Post by Sergey Beryozkin
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.
What JAX-RS context do you try to inject ?
Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have
this
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 27 more
I checkad again annontations in the service webservice, but I don't
find
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
what is wrong!
Thank you for your help!
Cedirc
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
------------------------------
If you reply to this email, your message will be added to the
discussion
Post by ced_benoit
Post by Sergey Beryozkin
.
NAML<
http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Post by ced_benoit
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730060.html
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
------------------------------
If you reply to this email, your message will be added to the discussion
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730067.html
To unsubscribe from [JAX-RS] error in start up server, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729730&code=Y2VkLmJlbm9pdEBnbWFpbC5jb218NTcyOTczMHwxMDYyOTEyMjQw>
.
NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730089.html
Sent from the cxf-user mailing list archive at Nabble.com.
Sergey Beryozkin
2013-06-28 15:33:31 UTC
Permalink
Hi
Post by ced_benoit
Hi Sergey,
No the problem is not resolved and I am new in JAX-RS. I have add your
@Context
private UriInfo uriOnfo;
in the class TestRest,
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
This is the first option to have it injected, into a field
Post by ced_benoit
@Context
*ublic* *void* setUriInfo(UriInfo ui)
{
*this*.uriOnfo = ui;
}
this is another option, use a setter, in this case you need to remove
@Context on the field, keep it on a method only
Post by ced_benoit
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
return Response.*ok*("test").build();
}
}
"Can you have a context like UriInfo injected this way and then accessed
This is option 3, pass is as a parameter.

Well, the actual problem is to do with some class loader issue and I'm
not sure what to advise there, I've never seen it before myself

Cheers, Sergey
Post by ced_benoit
Thank you for your help
Cedric
2013/6/28 Sergey Beryozkin [via CXF] <
Post by Sergey Beryozkin
Hi Cedric
Post by ced_benoit
Hi Sergey,
When you say: "What JAX-RS context do you try to inject ?", It means to
@Path("TestRest")
public class TestRest {
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
}
}
Which kind of context, i can inject in a simple case?
Did you get the issue resolved ? The exception trace led me to believe
that the runtime was trying to create a thread local proxy which would
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
@GET
@Path("/findId/{id}")
@Produces("application/json")
}
}
assuming TestRest is a singleton class.
Can you have a context like UriInfo injected this way and then accessed
from a method like findId() ?
Sergey
Post by ced_benoit
thank you for you help!
Cedric
2013/6/24 Sergey Beryozkin [via CXF] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5730067&i=0>>
Post by Sergey Beryozkin
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.
What JAX-RS context do you try to inject ?
Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have
this
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 27 more
I checkad again annontations in the service webservice, but I don't
find
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
what is wrong!
Thank you for your help!
Cedirc
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
------------------------------
If you reply to this email, your message will be added to the
discussion
Post by ced_benoit
Post by Sergey Beryozkin
.
NAML<
http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Post by ced_benoit
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730060.html
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
------------------------------
If you reply to this email, your message will be added to the discussion
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730067.html
To unsubscribe from [JAX-RS] error in start up server, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729730&code=Y2VkLmJlbm9pdEBnbWFpbC5jb218NTcyOTczMHwxMDYyOTEyMjQw>
.
NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730089.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com
ced_benoit
2013-07-02 19:35:26 UTC
Permalink
Hi Sergey,

OK, I come back about the first option in use @Context:

@Context
private UriInfo uriOnfo;

I would like to understand, when we do this above, we declare a variable
UriOnfo of type UriInfo, but in which case we can use in the class or in
which method?

thank you for your help?

Cedric

2013/6/28 Sergey Beryozkin [via CXF] <
Post by Sergey Beryozkin
Hi
Post by ced_benoit
Hi Sergey,
No the problem is not resolved and I am new in JAX-RS. I have add your
@Context
private UriInfo uriOnfo;
in the class TestRest,
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
This is the first option to have it injected, into a field
Post by ced_benoit
@Context
*ublic* *void* setUriInfo(UriInfo ui)
{
*this*.uriOnfo = ui;
}
this is another option, use a setter, in this case you need to remove
@Context on the field, keep it on a method only
Post by ced_benoit
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
return Response.*ok*("test").build();
}
}
"Can you have a context like UriInfo injected this way and then accessed
This is option 3, pass is as a parameter.
Well, the actual problem is to do with some class loader issue and I'm
not sure what to advise there, I've never seen it before myself
Cheers, Sergey
Post by ced_benoit
Thank you for your help
Cedric
2013/6/28 Sergey Beryozkin [via CXF] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5730094&i=0>>
Post by Sergey Beryozkin
Hi Cedric
Post by ced_benoit
Hi Sergey,
When you say: "What JAX-RS context do you try to inject ?", It means
to
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
@Path("TestRest")
public class TestRest {
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
}
}
Which kind of context, i can inject in a simple case?
Did you get the issue resolved ? The exception trace led me to believe
that the runtime was trying to create a thread local proxy which would
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
@GET
@Path("/findId/{id}")
@Produces("application/json")
}
}
assuming TestRest is a singleton class.
Can you have a context like UriInfo injected this way and then accessed
from a method like findId() ?
Sergey
Post by ced_benoit
thank you for you help!
Cedric
2013/6/24 Sergey Beryozkin [via CXF] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5730067&i=0>>
Post by Sergey Beryozkin
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible
from
Post by ced_benoit
Post by Sergey Beryozkin
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.
What JAX-RS context do you try to inject ?
Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have
this
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 27 more
I checkad again annontations in the service webservice, but I don't
find
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
what is wrong!
Thank you for your help!
Cedirc
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
------------------------------
If you reply to this email, your message will be added to the
discussion
Post by ced_benoit
Post by Sergey Beryozkin
.
NAML<
http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730060.html
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
------------------------------
If you reply to this email, your message will be added to the
discussion
Post by ced_benoit
Post by Sergey Beryozkin
.
NAML<
http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Post by ced_benoit
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730089.html
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
------------------------------
If you reply to this email, your message will be added to the
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730094.html
To unsubscribe from [JAX-RS] error in start up server, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729730&code=Y2VkLmJlbm9pdEBnbWFpbC5jb218NTcyOTczMHwxMDYyOTEyMjQw>
.
NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730189.html
Sent from the cxf-user mailing list archive at Nabble.com.
Sergey Beryozkin
2013-07-04 08:33:59 UTC
Permalink
Hi
Post by ced_benoit
Hi Sergey,
@Context
private UriInfo uriOnfo;
I would like to understand, when we do this above, we declare a variable
UriOnfo of type UriInfo, but in which case we can use in the class or in
which method?
When you have it injected into a field, as is or via a setter, you have
thread-safe proxy injected and at the invocation time a thread-specific
UriInfo instance will be accessible from all the resource methods

HTH, Sergey
Post by ced_benoit
thank you for your help?
Cedric
2013/6/28 Sergey Beryozkin [via CXF] <
Post by Sergey Beryozkin
Hi
Post by ced_benoit
Hi Sergey,
No the problem is not resolved and I am new in JAX-RS. I have add your
@Context
private UriInfo uriOnfo;
in the class TestRest,
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
This is the first option to have it injected, into a field
Post by ced_benoit
@Context
*ublic* *void* setUriInfo(UriInfo ui)
{
*this*.uriOnfo = ui;
}
this is another option, use a setter, in this case you need to remove
@Context on the field, keep it on a method only
Post by ced_benoit
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
return Response.*ok*("test").build();
}
}
"Can you have a context like UriInfo injected this way and then accessed
This is option 3, pass is as a parameter.
Well, the actual problem is to do with some class loader issue and I'm
not sure what to advise there, I've never seen it before myself
Cheers, Sergey
Post by ced_benoit
Thank you for your help
Cedric
2013/6/28 Sergey Beryozkin [via CXF] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5730094&i=0>>
Post by Sergey Beryozkin
Hi Cedric
Post by ced_benoit
Hi Sergey,
When you say: "What JAX-RS context do you try to inject ?", It means
to
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
@Path("TestRest")
public class TestRest {
@GET
@Path("/findId/{id}")
@Produces("application/json")
...
}
}
Which kind of context, i can inject in a simple case?
Did you get the issue resolved ? The exception trace led me to believe
that the runtime was trying to create a thread local proxy which would
@Path("TestRest")
public class TestRest {
@Context
private UriInfo uriOnfo;
@GET
@Path("/findId/{id}")
@Produces("application/json")
}
}
assuming TestRest is a singleton class.
Can you have a context like UriInfo injected this way and then accessed
from a method like findId() ?
Sergey
Post by ced_benoit
thank you for you help!
Cedric
2013/6/24 Sergey Beryozkin [via CXF] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5730067&i=0>>
Post by Sergey Beryozkin
Looks like
Post by ced_benoit
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible
from
Post by ced_benoit
Post by Sergey Beryozkin
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
causes it.
What JAX-RS context do you try to inject ?
Sergey
Post by ced_benoit
Hi,
when I start the server where I have the webservice JAX-RS, I have
this
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
SEVERE: error invoking
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:107)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1486)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:320)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deploy(CxfRsHttpListener.java:164)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployPojo(CxfRsHttpListener.java:110)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.deployPojo(RESTService.java:436)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:248)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 20 more
Caused by: java.lang.IllegalArgumentException: interface
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from
class
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:484)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:713)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:875)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:163)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:146)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:65)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:29)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(ProviderFactory.java:117)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:71)
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
... 27 more
I checkad again annontations in the service webservice, but I don't
find
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
what is wrong!
Thank you for your help!
Cedirc
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730.html
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
------------------------------
If you reply to this email, your message will be added to the
discussion
Post by ced_benoit
Post by Sergey Beryozkin
.
NAML<
http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730060.html
Post by ced_benoit
Post by Sergey Beryozkin
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
------------------------------
If you reply to this email, your message will be added to the
discussion
Post by ced_benoit
Post by Sergey Beryozkin
.
NAML<
http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Post by ced_benoit
--
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730089.html
Post by ced_benoit
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
------------------------------
If you reply to this email, your message will be added to the
http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730094.html
To unsubscribe from [JAX-RS] error in start up server, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729730&code=Y2VkLmJlbm9pdEBnbWFpbC5jb218NTcyOTczMHwxMDYyOTEyMjQw>
.
NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5730189.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com
cucerescu
2014-07-02 13:15:49 UTC
Permalink
I had the same error - the problem was that I had a wrong import :

javax.xml.ws.handler.MessageContext instead of
org.apache.cxf.jaxrs.ext.MessageContext.



--
View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-error-in-start-up-server-tp5729730p5745892.html
Sent from the cxf-user mailing list archive at Nabble.com.

Continue reading on narkive:
Loading...