Hi Hasintha,

According to the stacktrace, it seems that RuntimeDelegate class is loaded
from 2 bundles. Can you check if you have 2 dependecnies which provided
this class ?

Thanks
Thusitha

On Sat, Feb 25, 2017 at 5:10 PM, Hasintha Indrajee <[email protected]>
wrote:

>
> Hi all,
>
> I am getting the following class cast exception while initiating a
> Response builder. Following is the line of code causing this issue. Note
> that I am only getting this while running tests. Any Idea about the cause
> of this issue ?
>
> Response.ResponseBuilder builder = Response.noContent();
>
>
> msf4j-core[org.wso2.msf4j.internal.MSF4JMessageProcessor] : Unmapped
> exception
> java.lang.LinkageError: ClassCastException: attempting to
> castjar:file:/home/hasinthaindrajee/.m2/repository/javax/ws/rs/javax.
> ws.rs-api/2.0/javax.ws.rs-api-2.0.jar!/javax/ws/rs/ext/RuntimeDelegate.class
> to bundleresource://53.fwk689654773/javax/ws/rs/ext/RuntimeDelegate.class
> at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:146)
> at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
> at javax.ws.rs.core.Response$ResponseBuilder.newInstance(
> Response.java:848)
> at javax.ws.rs.core.Response.status(Response.java:590)
> at javax.ws.rs.core.Response.status(Response.java:601)
> at javax.ws.rs.core.Response.accepted(Response.java:709)
> at org.wso2.carbon.identity.sample.outbound.response.
> ACSRequestResponseBuilderFactory.createBuilder(
> ACSRequestResponseBuilderFactory.java:16)
> at org.wso2.carbon.identity.gateway.resource.GatewayManager.execute(
> GatewayManager.java:86)
> at org.wso2.carbon.identity.gateway.resource.GatewayResource.processGet(
> GatewayResource.java:59)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(
> HttpMethodInfo.java:132)
> at org.wso2.msf4j.internal.MSF4JMessageProcessor.dispatchMethod(
> MSF4JMessageProcessor.java:130)
> at org.wso2.msf4j.internal.MSF4JMessageProcessor.receive(
> MSF4JMessageProcessor.java:72)
> at org.wso2.carbon.transport.http.netty.listener.
> WorkerPoolDispatchingSourceHandler.lambda$publishToWorkerPool$12(
> WorkerPoolDispatchingSourceHandler.java:125)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
> --
> Hasintha Indrajee
> WSO2, Inc.
> Mobile:+94 771892453 <+94%2077%20189%202453>
>
>


-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog      alokayasoya.blogspot.com
About    http://about.me/thusithathilina
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to