Hi Sai,

Yes, it's certainly because the class JsonValue is coming from two
different classloaders.

Do you have two bundles providing the same class (maybe in different
version) ?

Regards
JB

On 20/05/2019 15:40, munishgupta.asr wrote:
> Hi Team
> 
> We upgraded our karaf version to 4.2.2. Then onward we are seeing
> ClassCastException on same class while installing a kar file.
> 
> The installation of new kar file triggers the activation of other bundle
> where code is fetching the some record from database and assigns to some dto
> object, there it it is throwing classcastException.
> 
> The Sample log snippet
> *com.google.common.util.concurrent.UncheckedExecutionException:
> java.lang.ClassCastException: com.good.gcs.jsonstore.dto.JsonValue cannot be
> cast to com.good.gcs.jsonstore.dto.JsonValue*
> 
> From internet resources, the classcastException on same class is because if
> it was loaded by 2 different class loaders . 
> 
> This behavior not seen when we are using old karaf versions like 3.x. or
> 4.0.x
> 
> Any help here please.
> 
> Thanks
> Sai
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to