Hi, The solution here could be
1. simply eliminate multiple versions for com.nextgate.ms.component.adapter.listener.mm.impl.MMNotifyConfigurationImpl from your container or 2. correctly use "use" directive in OSGi headers so that the dependency chain could be resolved without any ambiguity so that only one version com.nextgate.ms.component.adapter.listener.mm.impl.MMNotifyConfigurationImpl would be used in your bundle ------------- Freeman(Yue) Fang Red Hat, Inc. FuseSource is now part of Red Hat On 2014-3-28, at 上午2:48, asookazian2 wrote: > Bundle is currently active. we exec 'refresh xxx' for that bundle and start > that bundle. how to handle this as I've read the same class has been loaded > by 2 different classloaders and thus the exception... > > Caused by: java.lang.ClassCastException: > com.nextgate.ms.component.adapter.listener.mm.impl.MMNotifyConfigurationImpl > cannot be cast to > com.nextgate.ms.component.adapter.listener.mm.impl.MMNotifyConfigurationImpl > at > com.nextgate.ms.component.adapter.listener.mm.routes.MMNotifyRouteBuilder.refreshRoutes(MMNotifyRouteBuilder.java:110) > at > com.nextgate.ms.component.adapter.listener.mm.routes.MMNotifyRouteBuilder.configure(MMNotifyRouteBuilder.java:103) > at > org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:322) > at > org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:276) > at > org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:262) > at > org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669) > at > com.nextgate.ms.bundlelib.interfaces.NGMSBundleActivator.startup(NGMSBundleActivator.java:80) > at > com.nextgate.ms.component.adapter.listener.mm.routes.Activator.start(Activator.java:44) > at > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645) > at org.apache.felix.framework.Felix.activateBundle(Felix.java:2146) > ... 40 more > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/refresh-causes-ClassCastException-in-3-0-0-tp4032437.html > Sent from the Karaf - User mailing list archive at Nabble.com.
