i am using apache-tomee-jaxrs-1.5.2 server and created the restful client in java using this bellow line
Response response = WebClient.create("localhost:8080/test).path("/change/event").post(userdata);
i included following dependency in pom.xml
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.0.0-milestone1</version>
</dependency>
now compilation is success but when i deploy using mvn tomee:deploy then i am getting the foollowing exception localhost log file: http://www.docdroid.net/6snb/localhost-log.txt.html catalina log file:http://www.docdroid.net/6sne/cataline-log.txt.html
i do not know which dependency has problem and here my pom.xml file http://www.docdroid.net/6soc/mypom.txt.html
the catalina log file.
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) ... 78 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.(AbstractResourceInfo.java:65) at org.apache.cxf.jaxrs.model.ProviderInfo.(ProviderInfo.java:29) at org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:127) at org.apache.cxf.jaxrs.provider.ProviderFactory.(ProviderFactory.java:117) at org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:157) at org.apache.cxf.jaxrs.provider.ProviderFactory.(ProviderFactory.java:71) ... 85 more
you can use provided scope as a dependency in pom.xml. then it will work.e.g
use scope provided.