I tried with the following to invoke the service.

WebClient client = WebClient.create("
http://localhost:8080/weath/api/v1/cities/cities";, "test", "murali", null);

the above is giving following error. any ideas on how to resolve this?

Exception in thread "main" java.lang.VerifyError: Cannot inherit from final
class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.ymd.CxfClient.main(CxfClient.java:29)



*Thanks and Regards,*
Muralidhar Yaragalla.

*http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*

On Sun, Sep 25, 2016 at 6:17 AM, Yaragalla Muralidhar <
[email protected]> wrote:

> I have written the following code for cxf client
>
> public static void main(String[] args) {
> Client client = ClientBuilder.newBuilder().newClient();
> WebTarget target = client.target("http://localhost:8080/weath/api/v1";);
> target = target.path("cities/cities");
> Invocation.Builder builder = target.request();
> Response response = builder.get();
> System.out.println(response);
>
> }
>
>
> the above code is giving the following error:-
>
> Exception in thread "main" java.lang.AbstractMethodError:
> javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/
> ws/rs/core/UriBuilder;
> at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
> at org.apache.cxf.jaxrs.client.spec.ClientImpl.target(ClientImpl.java:109)
> at org.ymd.CxfClient.main(CxfClient.java:15)
>
>
> how can i rectify this?
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
>
> *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
>

Reply via email to