Error reported
11:26:32.251 [FelixStartLev] ERROR o.j.w.e.o.i.e.OSGiServiceBean - Unable to instantiate OSGiServiceBean [CdiCamelContext] with qualifiers [@Any @OSGiService @Filter(value=)] due to java.lang.IllegalArgumentException: org.apache.camel.component.cdi.CdiCamelContext is not an interface
ERROR: Bundle org.jboss.weld.osgi.weld-osgi-core-extension [51] EventDispatcher: Error during dispatch. (javax.enterprise.inject.CreationException: java.lang.IllegalArgumentException: org.apache.camel.component.cdi.CdiCamelContext is not an interface)
javax.enterprise.inject.CreationException: java.lang.IllegalArgumentException: org.apache.camel.component.cdi.CdiCamelContext is not an interface
at org.jboss.weld.environment.osgi.impl.extension.OSGiServiceBean.create(OSGiServiceBean.java:181)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:64)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:623)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:688)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:119)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:162)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:158)
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:132)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:154)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:291)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:64)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:623)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:228)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:576)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:566)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:561)
at org.jboss.weld.environment.osgi.impl.integration.IntegrationActivator.startManagement(IntegrationActivator.java:235)
at org.jboss.weld.environment.osgi.impl.integration.IntegrationActivator.bundleChanged(IntegrationActivator.java:150)
Code :
public class MainApp {
Logger logger = LoggerFactory.getLogger(BootStrap.class);
@Inject @OSGiService
CdiCamelContext camelCtx;
AND
package org.apache.camel.component.cdi;
import org.apache.camel.impl.DefaultCamelContext;
/**
- CDI {@link org.apache.camel.CamelContext} class.
*/
public class CdiCamelContext extends DefaultCamelContext {
|