Hi All,

I tried excluding using the way Thusitha mentioned but it didn't work, so
going ahead with creating an orbit bundle.

Thanks for the help everybody.

Regards.

On Monday, July 6, 2015, Danushka Fernando <danush...@wso2.com> wrote:

> When creating an orbit bundles that's not the way to do it. You can simply
> restrict what to export.
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
>
> On Jul 6, 2015 10:29 PM, "Thusitha Thilina Dayaratne" <thusit...@wso2.com
> <javascript:_e(%7B%7D,'cvml','thusit...@wso2.com');>> wrote:
>
>> Hi Sabra,
>>
>> As Dhanushka mentioned you can create a orbit bundle, or I think you can
>> exclude websocket from the tyrus as follows
>>
>> <dependency>
>>   <groupId>org.glassfish.tyrus.bundles</groupId>
>>   <artifactId>tyrus-standalone-client</artifactId>
>>   <version>1.11</version>
>>   <exclusions>
>>     <exclusion>
>>       <groupId>javax.websocket</groupId>
>>       <artifactId>javax.websocket-api</artifactId>
>>     </exclusion>
>>   </exclusions>
>> </dependency>
>>
>> Thanks
>>
>> On Mon, Jul 6, 2015 at 10:15 PM, Danushka Fernando <danush...@wso2.com
>> <javascript:_e(%7B%7D,'cvml','danush...@wso2.com');>> wrote:
>>
>>> You can create orbit bundles with 3rd party libraries and
>>> include/exclude packages.
>>>
>>> Thanks & Regards
>>> Danushka Fernando
>>> Senior Software Engineer
>>> WSO2 inc. http://wso2.com/
>>> Mobile : +94716332729
>>>
>>>
>>> On Jul 6, 2015 8:54 PM, "Sabra Ossen" <sabra...@gmail.com
>>> <javascript:_e(%7B%7D,'cvml','sabra...@gmail.com');>> wrote:
>>>
>>>> Hi Danushka,
>>>>
>>>> I didn't bundle the dependencies in WEB-INF/lib. I have excluded the
>>>> dependencies by
>>>> ...
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *<configuration>
>>>> <webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
>>>> <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
>>>> <warName>${project.artifactId}</warName></configuration>*...
>>>> in the pom.
>>>>
>>>> I only included the tyrus standalone client jar [1] to
>>>> AS_HOME/repository/components/lib.
>>>>
>>>> I had already included a webapp-classloading.xml with the following
>>>> content.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *<?xml version="1.0" encoding="ISO-8859-1"?><Classloading
>>>> xmlns="http://wso2.org/projects/as/classloading
>>>> <http://wso2.org/projects/as/classloading>">
>>>> <ParentFirst>false</ParentFirst>
>>>> <Environments>Carbon,CXF</Environments></Classloading>*
>>>>
>>>> Thanks for the reference on class loading in AS, given your suggestion
>>>> I checked the contents of tyrus standalone client and it contains a
>>>> javax.websocket.Endpoint class as shown by the attached screen shot. As
>>>> this Endpoint class is bundled with the 3rd party jar exclusion could be
>>>> done via the maven shade plugin. I will update the thread with the results
>>>> asap. If you do have any other suggestions do let me know.
>>>>
>>>> @Thusitha, I tried your suggestion but it resulted in no change due to
>>>> the websocket classes being present in the tyrus jar.
>>>>
>>>> [1]
>>>> http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11
>>>>
>>>> Thanks and Regards.
>>>>
>>>> On Mon, Jul 6, 2015 at 2:15 PM, Danushka Fernando <danush...@wso2.com
>>>> <javascript:_e(%7B%7D,'cvml','danush...@wso2.com');>> wrote:
>>>>
>>>>> Hi Sabra
>>>>> This is a class loading issue. Seems there are two jars providing same
>>>>> class in the jvm. So did you bundled the dependencies in to the 
>>>>> application
>>>>> (check WEB-INF/lib/ dir of the webapp)? What are jars you copied in to the
>>>>> $CARBON_HOME/repository/components/lib and 
>>>>> $CARBON_HOME/repository/components/dropins
>>>>> directories?
>>>>>
>>>>> Probably what Thusitha mentioned would work for you. But you could
>>>>> ended up with series of exceptions if you continue without understanding.
>>>>> :). So I recommend you to go through [1].
>>>>>
>>>>> [1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading
>>>>>
>>>>>
>>>>> Thanks & Regards
>>>>> Danushka Fernando
>>>>> Senior Software Engineer
>>>>> WSO2 inc. http://wso2.com/
>>>>> Mobile : +94716332729
>>>>>
>>>>> On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
>>>>> thusit...@wso2.com
>>>>> <javascript:_e(%7B%7D,'cvml','thusit...@wso2.com');>> wrote:
>>>>>
>>>>>> Hi Sabra
>>>>>>
>>>>>> I think you should mark following dependency as provided since AS
>>>>>> provided required jars for the websocket
>>>>>>
>>>>>>>
>>>>>>> *       <dependency>*
>>>>>>> *            <groupId>javax.websocket</groupId>*
>>>>>>> *            <artifactId>javax.websocket-api</artifactId>**
>>>>>>> <version>1.1</version>*
>>>>>>
>>>>>>
>>>>>> *                <scope>provided</scope>*
>>>>>>>
>>>>>>> *        </dependency>*
>>>>>>
>>>>>>
>>>>>> On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen <sabra...@gmail.com
>>>>>> <javascript:_e(%7B%7D,'cvml','sabra...@gmail.com');>> wrote:
>>>>>>
>>>>>>> Hi Sajith,
>>>>>>>
>>>>>>> I moved it to AS_HOME/repository/components/lib , but now I get the
>>>>>>> following exception.
>>>>>>>
>>>>>>> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
>>>>>>> constraint violation: loader (instance of
>>>>>>> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
>>>>>>> initiated loading for a different type with name 
>>>>>>> "javax/websocket/Endpoint"
>>>>>>>
>>>>>>>     at
>>>>>>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
>>>>>>>     at
>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
>>>>>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>>>>>>>     at
>>>>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>     at
>>>>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>>>>>>>     at
>>>>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>>>>>>>     at
>>>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>>>>>>>     at
>>>>>>> org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:47)
>>>>>>>     at
>>>>>>> org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
>>>>>>>     at
>>>>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
>>>>>>>     at
>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
>>>>>>>     at
>>>>>>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
>>>>>>>     at
>>>>>>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
>>>>>>>     at
>>>>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
>>>>>>>     at
>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
>>>>>>>     at
>>>>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>>>>>>>     at
>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
>>>>>>>     at
>>>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>>>>>>>     at
>>>>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
>>>>>>>     at
>>>>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
>>>>>>>     at
>>>>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
>>>>>>>     at
>>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
>>>>>>>     at
>>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
>>>>>>>     at
>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>>>>     at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>>>>     at
>>>>>>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>>>>     at java.lang.Thread.run(Thread.java:745)
>>>>>>> Caused by: org.apache.cxf.interceptor.Fault: loader constraint
>>>>>>> violation: loader (instance of
>>>>>>> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
>>>>>>> initiated loading for a different type with name 
>>>>>>> "javax/websocket/Endpoint"
>>>>>>>     at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
>>>>>>>     at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
>>>>>>>     at
>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
>>>>>>>     at
>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
>>>>>>>     at
>>>>>>> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
>>>>>>>     at
>>>>>>> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
>>>>>>>     at
>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
>>>>>>>     ... 40 more
>>>>>>> Caused by: java.lang.LinkageError: loader constraint violation:
>>>>>>> loader (instance of
>>>>>>> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
>>>>>>> initiated loading for a different type with name 
>>>>>>> "javax/websocket/Endpoint"
>>>>>>>     at java.lang.ClassLoader.defineClass1(Native Method)
>>>>>>>     at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:638)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:613)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:574)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
>>>>>>>     at
>>>>>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
>>>>>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>>>>>>>     at
>>>>>>> org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:511)
>>>>>>>     at
>>>>>>> org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:355)
>>>>>>>     at
>>>>>>> org.test.jaxrs.HelloService.connectToWSServer(HelloService.java:35)
>>>>>>>     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:606)
>>>>>>>     at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
>>>>>>>     at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
>>>>>>>     ... 45 more
>>>>>>>
>>>>>>> @Sagara, I excluded the dependencies from the .WAR file as it might
>>>>>>> cause problems such as above with the AS. And I will include all the 
>>>>>>> tyrus
>>>>>>> dependencies and check it out as well.
>>>>>>>
>>>>>>> Regards.
>>>>>>>
>>>>>>> On Mon, Jul 6, 2015 at 12:49 PM, Sajith Kariyawasam <saj...@wso2.com
>>>>>>> <javascript:_e(%7B%7D,'cvml','saj...@wso2.com');>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Jul 6, 2015 at 12:37 PM, Sabra Ossen <sabra...@gmail.com
>>>>>>>> <javascript:_e(%7B%7D,'cvml','sabra...@gmail.com');>> wrote:
>>>>>>>>
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> I am trying to send messages to a web socket server through a
>>>>>>>>> jax-rs service using tyrus [1]. I have separately deployed the web 
>>>>>>>>> socket
>>>>>>>>> server in the AS 5.3.0 alpha.
>>>>>>>>>
>>>>>>>>> The code for the jax-rs service is as follows.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *@Path("/hello")public class HelloService {    private static
>>>>>>>>> CountDownLatch messageLatch;    @GET    @Path("/{message}")    public 
>>>>>>>>> void
>>>>>>>>> connectToWSServer(@PathParam("message") final String message) throws
>>>>>>>>> URISyntaxException, IOException, DeploymentException, 
>>>>>>>>> InterruptedException
>>>>>>>>> {        String endPoint = "ws://127.0.0.1:9763/WebSocketServer/echo
>>>>>>>>> <http://127.0.0.1:9763/WebSocketServer/echo>";        messageLatch = 
>>>>>>>>> new
>>>>>>>>> CountDownLatch(1);        final ClientEndpointConfig cec =
>>>>>>>>> ClientEndpointConfig.Builder.create().build();        ClientManager 
>>>>>>>>> client
>>>>>>>>> = ClientManager.createClient();        client.connectToServer(new
>>>>>>>>> Endpoint() {            @Override            public void 
>>>>>>>>> onOpen(Session
>>>>>>>>> session, EndpointConfig config) {                try {
>>>>>>>>> session.addMessageHandler(new MessageHandler.Whole<String>()
>>>>>>>>> {                        @Override                        public void
>>>>>>>>> onMessage(String message) {
>>>>>>>>> System.out.println("Received message:
>>>>>>>>> "+message);
>>>>>>>>> messageLatch.countDown();                        }
>>>>>>>>> });
>>>>>>>>> session.getBasicRemote().sendText(message);                } catch
>>>>>>>>> (IOException e) {                    e.printStackTrace();
>>>>>>>>> }            }        }, cec, new URI(endPoint));
>>>>>>>>> messageLatch.await(100, TimeUnit.SECONDS);    }}*
>>>>>>>>>
>>>>>>>>> The pom is as follows.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *<?xml version="1.0" encoding="UTF-8"?><project
>>>>>>>>> xmlns="http://maven.apache.org/POM/4.0.0
>>>>>>>>> <http://maven.apache.org/POM/4.0.0>"
>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>>>>>>>>> <http://www.w3.org/2001/XMLSchema-instance>"
>>>>>>>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>>>>>>>> <http://maven.apache.org/POM/4.0.0>
>>>>>>>>> http://maven.apache.org/xsd/maven-4.0.0.xsd
>>>>>>>>> <http://maven.apache.org/xsd/maven-4.0.0.xsd>">
>>>>>>>>> <modelVersion>4.0.0</modelVersion>    
>>>>>>>>> <groupId>org.test.jaxrs</groupId>
>>>>>>>>> <artifactId>FirstJaxRsService</artifactId>
>>>>>>>>> <version>1.0-SNAPSHOT</version>    <packaging>war</packaging>
>>>>>>>>> <dependencies>        <dependency>            <groupId>javax.ws.rs
>>>>>>>>> <http://javax.ws.rs></groupId>
>>>>>>>>> <artifactId>jsr311-api</artifactId>
>>>>>>>>> <version>1.1.1</version>        </dependency>
>>>>>>>>> <dependency>            <groupId>org.apache.cxf</groupId>
>>>>>>>>> <artifactId>cxf-rt-transports-http</artifactId>
>>>>>>>>> <version>3.1.1</version>        </dependency>
>>>>>>>>> <dependency>            <groupId>org.apache.cxf</groupId>
>>>>>>>>> <artifactId>cxf-rt-frontend-jaxrs</artifactId>
>>>>>>>>> <version>3.1.1</version>        </dependency>
>>>>>>>>> <dependency>            <groupId>commons-httpclient</groupId>
>>>>>>>>> <artifactId>commons-httpclient</artifactId>
>>>>>>>>> <version>3.1</version>        </dependency>        <dependency>
>>>>>>>>> <groupId>javax.websocket</groupId>
>>>>>>>>> <artifactId>javax.websocket-api</artifactId>
>>>>>>>>> <version>1.1</version>        </dependency>        <dependency>
>>>>>>>>> <groupId>org.glassfish.tyrus.bundles</groupId>
>>>>>>>>> <artifactId>tyrus-standalone-client</artifactId>
>>>>>>>>> <version>1.11</version>        </dependency>    </dependencies>
>>>>>>>>> <build>        <plugins>            <plugin>
>>>>>>>>> <artifactId>maven-compiler-plugin</artifactId>
>>>>>>>>> <version>3.1</version>                <configuration>
>>>>>>>>> <source>1.5</source>                    <target>1.5</target>
>>>>>>>>> </configuration>            </plugin>            <plugin>
>>>>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>>>>> <version>2.2</version>                <configuration>
>>>>>>>>> <webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
>>>>>>>>> <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
>>>>>>>>> <warName>${project.artifactId}</warName>
>>>>>>>>> </configuration>            </plugin>        </plugins>
>>>>>>>>> </build></project>*
>>>>>>>>>
>>>>>>>>> I have included the tyrus-standalone-client-1.11.jar [2] in
>>>>>>>>> AS_HOME/repository/components/dropins, but I get the following 
>>>>>>>>> exception.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Since its a non osgi bundle, this needs to be copied to
>>>>>>>> AS_HOME/repository/components/lib directory
>>>>>>>>
>>>>>>>>
>>>>>>>>> [2015-07-06 12:05:15,756] ERROR
>>>>>>>>> {org.apache.catalina.core.StandardWrapperValve} -  Servlet.service() 
>>>>>>>>> for
>>>>>>>>> servlet [JAXServlet] in context with path [/FirstJaxRsService] threw
>>>>>>>>> exception
>>>>>>>>> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault:
>>>>>>>>> org/glassfish/tyrus/client/ClientManager
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
>>>>>>>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>>>     at
>>>>>>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:47)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
>>>>>>>>>     at
>>>>>>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
>>>>>>>>>     at
>>>>>>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
>>>>>>>>>     at
>>>>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
>>>>>>>>>     at
>>>>>>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
>>>>>>>>>     at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>>>>>>     at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>>>>>>     at
>>>>>>>>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>>>>>>>>     at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> Caused by: org.apache.cxf.interceptor.Fault:
>>>>>>>>> org/glassfish/tyrus/client/ClientManager
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
>>>>>>>>>     ... 40 more
>>>>>>>>> Caused by: java.lang.NoClassDefFoundError:
>>>>>>>>> org/glassfish/tyrus/client/ClientManager
>>>>>>>>>     at
>>>>>>>>> org.test.jaxrs.HelloService.connectToWSServer(HelloService.java:33)
>>>>>>>>>     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:606)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
>>>>>>>>>     ... 45 more
>>>>>>>>> Caused by: *java.lang.ClassNotFoundException:
>>>>>>>>> org.glassfish.tyrus.client.ClientManager*
>>>>>>>>>     at
>>>>>>>>> org.wso2.carbon.webapp.mgt.loader.CarbonWebappClassLoader.loadClass(CarbonWebappClassLoader.java:154)
>>>>>>>>>     at
>>>>>>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
>>>>>>>>>     ... 52 more
>>>>>>>>>
>>>>>>>>> Can anyone help me resolve this issue.
>>>>>>>>>
>>>>>>>>> [1]
>>>>>>>>> https://tyrus.java.net/documentation/1.11/user-guide.html#d0e78
>>>>>>>>> [2]
>>>>>>>>> http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11
>>>>>>>>>
>>>>>>>>> Thanks and Regards.
>>>>>>>>> --
>>>>>>>>> Sabra Ossen <http://lk.linkedin.com/in/sabraossen>
>>>>>>>>> Undergraduate | Department of Computer Science and Engineering
>>>>>>>>> University of Moratuwa
>>>>>>>>> Sri Lanka
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Dev mailing list
>>>>>>>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sajith Kariyawasam
>>>>>>>> *Committer and PMC member, Apache Stratos, *
>>>>>>>> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
>>>>>>>> *Mobile: 0772269575*
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sabra Ossen <http://lk.linkedin.com/in/sabraossen>
>>>>>>> Undergraduate | Department of Computer Science and Engineering
>>>>>>> University of Moratuwa
>>>>>>> Sri Lanka
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Dev mailing list
>>>>>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thusitha Dayaratne
>>>>>> Software Engineer
>>>>>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>>>>>
>>>>>> Mobile  +94712756809
>>>>>> Blog      alokayasoya.blogspot.com
>>>>>> About    http://about.me/thusithathilina
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Dev mailing list
>>>>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sabra Ossen <http://lk.linkedin.com/in/sabraossen>
>>>> Undergraduate | Department of Computer Science and Engineering
>>>> University of Moratuwa
>>>> Sri Lanka
>>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog      alokayasoya.blogspot.com
>> About    http://about.me/thusithathilina
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org <javascript:_e(%7B%7D,'cvml','Dev@wso2.org');>
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>

-- 
Sabra Ossen <http://lk.linkedin.com/in/sabraossen>
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to