Hi Gayan,

This resolved the issue. Thanks for your inputs.

On Mon, Feb 27, 2017 at 6:38 AM, Gayan Gunawardana <ga...@wso2.com> wrote:

> @Hasintha
>
> Please add this to user dependency list and check.
>
> <dependency>
>     <groupId>org.wso2.msf4j</groupId>
>     <artifactId>jaxrs-delegates</artifactId>
>     <version>${msf4j.version}</version>
>     <scope>test</scope>
> </dependency>
>
> optionList.add(mavenBundle().
>         groupId("org.wso2.msf4j").
>         artifactId("jaxrs-delegates")
>         .versionAsInProject().noStart())
>
> Thanks,
>
> Gayan
>
>
> On Sat, Feb 25, 2017 at 9:07 PM, Hasintha Indrajee <hasin...@wso2.com>
> wrote:
>
>> @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 <
>> thusit...@wso2.com> 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 <hasin...@wso2.com>
>>> 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/RuntimeDele
>>>> gate.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(ACSRequestResponseBuild
>>>> erFactory.java:16)
>>>> at org.wso2.carbon.identity.gateway.resource.GatewayManager.exe
>>>> cute(GatewayManager.java:86)
>>>> at org.wso2.carbon.identity.gateway.resource.GatewayResource.pr
>>>> ocessGet(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 <+94%2077%20189%202453>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Gayan Gunawardana
> Software Engineer; WSO2 Inc.; http://wso2.com/
> Email: ga...@wso2.com
> Mobile: +94 (71) 8020933
>



-- 
Hasintha Indrajee
WSO2, Inc.
Mobile:+94 771892453
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to