cancel
Showing results for 
Search instead for 
Did you mean: 

Got Error of ClassCastException, any special annotations for plugin`s dependencies?

SOLVED
Highlighted
Occasional Contributor

Got Error of ClassCastException, any special annotations for plugin`s dependencies?

Our listener plugin has dependency that has dependency on jersey-client.jar, When we executes the ReadyAPI test by testrunner, we got the error below.  Any idea why this will happened? Plugin and it`s dependency are in different ClassLoader?  Any idea how to avoid it? 

Thanks in advance.

 

Caused by: java.lang.LinkageError: ClassCastException: attempting to castjar:file:/F:/ReadyAPI/ReadyAPI-1.3.1-m-SNAPSHOT/lib/jersey-core-1.18.1.jar!/javax/ws/rs/ext/RuntimeDelegate.classtojar:file:/C:/Users/QA_TES~1/AppData/Local/Temp/ready5033785732690850359.jar!/javax/ws/rs/ext/RuntimeDelegate.class

        at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:116)

        at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)

        at com.sun.jersey.api.client.ClientRequest.<clinit>(ClientRequest.java:216)

        at com.sun.jersey.api.client.WebResource.get(WebResource.java:193)

 

Regards,

Grrison

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Occasional Contributor

issue was fixed by adding Annotation @UsePluginClassloader to the method where the exception is thrown out.

 

Thanks

View solution in original post

Highlighted

Odd, I wrote a reply with this solution a couple of days ago, but apparently something went wrong. Maybe I just forgot to click 'Post'...

 

Glad that this solved your problem!

View solution in original post

2 REPLIES 2
Highlighted
Occasional Contributor

issue was fixed by adding Annotation @UsePluginClassloader to the method where the exception is thrown out.

 

Thanks

View solution in original post

Highlighted

Odd, I wrote a reply with this solution a couple of days ago, but apparently something went wrong. Maybe I just forgot to click 'Post'...

 

Glad that this solved your problem!

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Building with the Collaborator API

Help Documenation
The Collaborator API is a JSON-RPC API that lets you integrate with Collaborator 9.0 and above. For more information about how the API works, check out the API description here:


Sample Plugins
For an example of an add-in that uses the API, take a look at the Microsoft Word Add-in for Collaborator:


We list all the great plugins our network has already built on this page on the SmartBear website.