@KasunG : We cannot exclude this dependency since it's required to build up osgi environment for tests. I checked and removed all other transitive ways of inheriting this dependency. But still the issue is there.
@Thusitha : This is not due to picking two bundles. Rather picking a bundle and a maven dependency I guess. So we need to to find a way to exclude this maven dependency from test run time. I checked adding different scopes (ex - test, compile) But still couldn't get it solved. On Sat, Feb 25, 2017 at 5:17 PM, Thusitha Thilina Dayaratne < [email protected]> wrote: > 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(Respon >> se.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.ACSRequest >> ResponseBuilderFactory.createBuilder(ACSRequestRespon >> seBuilderFactory.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(NativeMethodAcce >> ssorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMet >> hodInfo.java:132) >> at org.wso2.msf4j.internal.MSF4JMessageProcessor.dispatchMethod >> (MSF4JMessageProcessor.java:130) >> at org.wso2.msf4j.internal.MSF4JMessageProcessor.receive(MSF4JM >> essageProcessor.java:72) >> at org.wso2.carbon.transport.http.netty.listener.WorkerPoolDisp >> atchingSourceHandler.lambda$publishToWorkerPool$12(WorkerPoo >> lDispatchingSourceHandler.java:125) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool >> Executor.java:1142) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo >> lExecutor.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 <071%20275%206809> > Blog alokayasoya.blogspot.com > About http://about.me/thusithathilina > <http://wso2.com/signature> > > -- Hasintha Indrajee WSO2, Inc. Mobile:+94 771892453
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
