I am writing a RESTful client which runs on Apache Karaf 3.0.2 (as does the
JAX-RS REST service class).

I am getting the following exception:

Caused by: java.lang.ClassNotFoundException:
javax.ws.rs.client.ClientException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 3 more

when this line of code executes:

WebClient wc = WebClient.create("http://"; + server + ":" + port +
"/foo/bar");

I am running my test in Eclipse.

I have looked but can't determine which JAR has this class
(javax.ws.rs.client.ClientException).

Please advise how to resolve.  thx.

Currently I have the following cxf dependencies in my pom.xml:

<dependency>
              <groupId>org.apache.cxf</groupId>
              <artifactId>cxf-rt-frontend-jaxrs</artifactId>
              <version>2.7.13</version>
            </dependency>
            
            <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
        </dependency>
        
        <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-bundle-jaxrs</artifactId>
                        <version>2.7.13</version>
                </dependency>
                
                <dependency>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-rt-frontend-jaxws</artifactId>
                    <version>2.7.13</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-rt-transports-http</artifactId>
                    <version>2.7.13</version>
                </dependency>



--
View this message in context: 
http://cxf.547215.n5.nabble.com/ClassNotFoundException-javax-ws-rs-client-ClientException-tp5755147.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to