cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystian Panek (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-6221) CDI integration extension does not detect annotations on Karaf
Date Sat, 28 Feb 2015 18:37:06 GMT

    [ https://issues.apache.org/jira/browse/CXF-6221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341552#comment-14341552
] 

Krystian Panek edited comment on CXF-6221 at 2/28/15 6:37 PM:
--------------------------------------------------------------

I noticed a problem with using 3.1.0-snapshot version of cxf-integration-cdi:

{code}
2015-02-28 15:20:55,892 | WARN  | pache.cxf.osgi]) | ServletExporter                  | 139
- org.apache.cxf.cxf-rt-transports-http - 3.1.0.SNAPSHOT | Error registering CXF OSGi servlet
alias is already in use in this or another context
org.osgi.service.http.NamespaceException: alias is already in use in this or another context
	at org.ops4j.pax.web.service.spi.model.ServerModel.addServletModel(ServerModel.java:128)[58:org.ops4j.pax.web.pax-web-spi:3.1.4]
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:206)[59:org.ops4j.pax.web.pax-web-runtime:3.1.4]
{code}

In my Karaf assembly,CXF non-spring servlet is registered at "/cxf" after installing feature
'cxf-jaxrs', so we have a collision. Even I have never observed that 'CxfCdiServet' is registered
but 'CxfNonSpringServlet' always.
{code}
 <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <configuration>
                    <bootFeatures>
                        <! [...] -->
                        <feature>cxf-jaxrs</feature>
                    </bootFeatures>
                </configuration>
            </plugin>
{code}

Did you investigated what is an effort to get working CDI scopes with CXF? I think that CXF
dispatcher servlet should be listened by http://grepcode.com/file/repo1.maven.org/maven2/org.jboss.weld/weld-core/2.2.5.Final/org/jboss/weld/servlet/WeldInitialListener.java#WeldInitialListener
and scopes should start work.

I also tried with OpenWebBeans but:
* is uses CDI 1.0
* when I downgrade CDI to 1.0 in cxf-cdi-bridge/cxf-integration-cdi I am getting stuck on:
{code}
2015-02-28 19:22:44,405 | ERROR | FelixStartLevel  | extender                         | 98
- org.ops4j.pax.cdi.extender 
- 0.11.0 | [CdiExtender(6)] The activate method has thrown an exception                  
                              
org.apache.webbeans.proxy.ProxyGenerationException: java.lang.reflect.InvocationTargetException
                        
       at org.apache.webbeans.proxy.AbstractProxyFactory.defineAndLoadClass(AbstractProxyFactory.java:275)
             
       at org.apache.webbeans.proxy.AbstractProxyFactory.createProxyClass(AbstractProxyFactory.java:185)
               
       at org.apache.webbeans.proxy.NormalScopeProxyFactory.createProxyClass(NormalScopeProxyFactory.java:268)
         
       at org.apache.webbeans.proxy.NormalScopeProxyFactory.createProxyClass(NormalScopeProxyFactory.java:199)
         
       at org.apache.webbeans.proxy.NormalScopeProxyFactory.createNormalScopeProxy(NormalScopeProxyFactory.java:148)
   
       at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
                         
       at org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:153)
             
       at com.neva.osgi.cdicxfbridge.JAXRSCdiResourceExtension.load(JAXRSCdiResourceExtension.java:63)
                 
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_31]         
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
                     
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:266)
                             
       at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:482)
                        
       at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:446)
                            
       at org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:436)
                   
       at org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:374)
          
       at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:205)        
                              
       at org.apache.webbeans.lifecycle.AbstractLifeCycle.bootstrapApplication(AbstractLifeCycle.java:141)
             
       at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:107)
                 
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer$1.call(OpenWebBeansCdiContainer.java:106)
       
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer$1.call(OpenWebBeansCdiContainer.java:100)
       
       at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)
       
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer.createWebBeansContext(OpenWebBeansCdiContainer.ja
va:100)                                                                                  
                              
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer.doStart(OpenWebBeansCdiContainer.java:146)
      
       at org.ops4j.pax.cdi.spi.AbstractCdiContainer.start(AbstractCdiContainer.java:89) 
                              
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.createContainer(CdiExtender.java:132)[98:org.ops4j.pax.cdi.extende
r:0.11.0]                                                                                
                              
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.addingBundle(CdiExtender.java:86)[98:org.ops4j.pax.cdi.extender:0.
11.0]                                                                                    
                              
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.addingBundle(CdiExtender.java:44)[98:org.ops4j.pax.cdi.extender:0.
11.0]                                                                                    
                              
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)[karaf-org.osgi.core.jar:]
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)[karaf-org.osgi.core.jar:]
       at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf-org.osgi.core.jar:]
        
       at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf-org.osgi.core.jar:]
       
       at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)[karaf-org.osgi.core.jar:]
                   
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.activate(CdiExtender.java:64)[98:org.ops4j.pax.cdi.extender:0.11.0
]                                                                                        
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_31]         
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
                     
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)  
                              
       at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)     
                              
       at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)
                             
       at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)        
                              
       at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:149)
                              
       at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.jav
a:315)                                                                                   
                              
       at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:127)
    
       at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:871)
         
       at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:838)
 
       at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:850)
       at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:419)
         
       at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java
:376)                                                                                    
                              
       at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:172)
             
       at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:120)
                 
       at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:258)         
                              
       at org.apache.felix.scr.impl.Activator.access$000(Activator.java:45)              
                              
       at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:185)     
                              
       at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
                  
       at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
                   
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:479)[karaf-org.osgi.core.jar
:]                                                                                       
                              
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:414)[karaf-org.osgi.core.jar
:]                                                                                       
                              
       at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[karaf-org.osgi.core.jar:]
              
       at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)[karaf-org.osgi.core.jar:]
  
       at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)[org.apa
che.felix.framework-4.2.1.jar:]                                                          
                              
       at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)[org.apache.feli
x.framework-4.2.1.jar:]                                                                  
                              
       at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)[org.apache.felix.fra
mework-4.2.1.jar:]                                                                       
                              
       at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]
     
       at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]
         
       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)               
                              
       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)               
                              
       at org.apache.karaf.features.internal.FeaturesServiceImpl.cleanUpOnFailure(FeaturesServiceImpl.java:531)
        
       at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:478)
         
       at org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:92)
  
       at org.apache.karaf.features.internal.BootFeaturesInstaller.start(BootFeaturesInstaller.java:76)
                
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_31]         
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
                     
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[20:org.apache.aries.blueprin
t.core:1.4.2]                                                                            
                              
       at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[20:org.apache.aries.blueprint.core
:1.4.2]                                                                                  
                              
       at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[20:org.apache.aries.bluep
rint.core:1.4.2]                                                                         
                              
       at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[20:org.apache.aries.bluep
rint.core:1.4.2]                                                                         
                              
       at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[20:org.apache.aries.bluepr
int.core:1.4.2]                                                                          
                              
       at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[20:org.apache.aries.blueprint.core
:1.4.2]                                                                                  
                              
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_31]            
                              
       at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[20:org.apache.aries.blueprint.core
:1.4.2]                                                                                  
                              
       at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[20:org.
apache.aries.blueprint.core:1.4.2]                                                       
                              
       at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[20:org.apache
.aries.blueprint.core:1.4.2]                                                             
                              
       at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.
java:682)[20:org.apache.aries.blueprint.core:1.4.2]                                      
                              
       at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[20:org.apac
he.aries.blueprint.core:1.4.2]                                                           
                              
       at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[20:org.apache
.aries.blueprint.core:1.4.2]                                                             
                              
       at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)[20:org.apac
he.aries.blueprint.core:1.4.2]                                                           
                              
       at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:263)[20:org.apac
he.aries.blueprint.core:1.4.2]                                                           
                              
       at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:253)[20:org.apach
e.aries.blueprint.core:1.4.2]                                                            
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.
java:500)[14:org.apache.aries.util:1.1.0]                                                
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.
java:433)[14:org.apache.aries.util:1.1.0]                                                
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:
725)[14:org.apache.aries.util:1.1.0]                                                     
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:
463)[14:org.apache.aries.util:1.1.0]                                                     
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:
422)[14:org.apache.aries.util:1.1.0]                                                     
                              
       at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.fr
amework-4.2.1.jar:]                                                                      
                              
       at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.
felix.framework-4.2.1.jar:]                                                              
                              
       at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.fra
mework-4.2.1.jar:]                                                                       
                              
       at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]
     
       at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]
         
       at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)[org.apache.felix.framework-4.2.1.jar:]
 
       at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.fram
ework-4.2.1.jar:]                                                                        
                              
       at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]                               
                              
Caused by: java.lang.reflect.InvocationTargetException                                   
                              
       at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)                    
                              
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.webbeans.proxy.AbstractProxyFactory.defineAndLoadClass(AbstractProxyFactory.java:268)
             
       ... 105 more                                                                      
                              
Caused by: java.lang.NoClassDefFoundError: org/apache/webbeans/proxy/OwbNormalScopeProxy 
                              
       at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_31]                   
                              
       at java.lang.ClassLoader.defineClass(ClassLoader.java:760)[:1.8.0_31]             
                              
       at java.lang.ClassLoader.defineClass(ClassLoader.java:642)[:1.8.0_31]             
                              
       ... 109 more                                                                      
                              
Caused by: java.lang.ClassNotFoundException: org.apache.webbeans.proxy.OwbNormalScopeProxy
not found by org.apache.cxf.c
xf-core [125]                                                                            
                              
       at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
      
       at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
                             
       at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
          
       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_31]               
                              
       ... 112 more                                                                      
                              
2015-02-28 19:22:44,439 | ERROR | FelixStartLevel  | extender                         | 98
- org.ops4j.pax.cdi.extender 
- 0.11.0 | [CdiExtender(6)] Failed creating the component instance; see log for reason   
                              
{code} 

I have no idea how to go forward... 


was (Author: ciapunek):
I noticed a problem with using 3.1.0-snapshot version of cxf-integration-cdi:

{code}
2015-02-28 15:20:55,892 | WARN  | pache.cxf.osgi]) | ServletExporter                  | 139
- org.apache.cxf.cxf-rt-transports-http - 3.1.0.SNAPSHOT | Error registering CXF OSGi servlet
alias is already in use in this or another context
org.osgi.service.http.NamespaceException: alias is already in use in this or another context
	at org.ops4j.pax.web.service.spi.model.ServerModel.addServletModel(ServerModel.java:128)[58:org.ops4j.pax.web.pax-web-spi:3.1.4]
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:206)[59:org.ops4j.pax.web.pax-web-runtime:3.1.4]
{code}

In my Karaf assembly,CXF non-spring servlet is registered at "/cxf" after installing feature
'cxf-jaxrs', so we have a collision. Even I have never observed that 'CxfCdiServet' is registered
but 'CxfNonSpringServlet' always.
{code}
 <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <configuration>
                    <bootFeatures>
                        <! [...] -->
                        <feature>cxf-jaxrs</feature>
                    </bootFeatures>
                </configuration>
            </plugin>
{code}

Did you investigated what is an effort to get working CDI scopes with CXF? I think that CXF
dispatcher servlet should be listened by http://grepcode.com/file/repo1.maven.org/maven2/org.jboss.weld/weld-core/2.2.5.Final/org/jboss/weld/servlet/WeldInitialListener.java#WeldInitialListener
and scopes should start work.

I also tried with OpenWebBeans but:
* is uses CDI 1.0
* when I downgrade CDI to 1.0 in cxf-cdi-bridge/cxf-integration-cdi I am getting stuck on:
{code}
2015-02-28 19:22:44,405 | ERROR | FelixStartLevel  | extender                         | 98
- org.ops4j.pax.cdi.extender 
- 0.11.0 | [CdiExtender(6)] The activate method has thrown an exception                  
                              
org.apache.webbeans.proxy.ProxyGenerationException: java.lang.reflect.InvocationTargetException
                        
       at org.apache.webbeans.proxy.AbstractProxyFactory.defineAndLoadClass(AbstractProxyFactory.java:275)
             
       at org.apache.webbeans.proxy.AbstractProxyFactory.createProxyClass(AbstractProxyFactory.java:185)
               
       at org.apache.webbeans.proxy.NormalScopeProxyFactory.createProxyClass(NormalScopeProxyFactory.java:268)
         
       at org.apache.webbeans.proxy.NormalScopeProxyFactory.createProxyClass(NormalScopeProxyFactory.java:199)
         
       at org.apache.webbeans.proxy.NormalScopeProxyFactory.createNormalScopeProxy(NormalScopeProxyFactory.java:148)
   
       at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
                         
       at org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:153)
             
       at com.neva.osgi.cdicxfbridge.JAXRSCdiResourceExtension.load(JAXRSCdiResourceExtension.java:63)
                 
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_31]         
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
                     
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:266)
                             
       at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:482)
                        
       at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:446)
                            
       at org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:436)
                   
       at org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:374)
          
       at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:205)        
                              
       at org.apache.webbeans.lifecycle.AbstractLifeCycle.bootstrapApplication(AbstractLifeCycle.java:141)
             
       at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:107)
                 
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer$1.call(OpenWebBeansCdiContainer.java:106)
       
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer$1.call(OpenWebBeansCdiContainer.java:100)
       
       at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)
       
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer.createWebBeansContext(OpenWebBeansCdiContainer.ja
va:100)                                                                                  
                              
       at org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer.doStart(OpenWebBeansCdiContainer.java:146)
      
       at org.ops4j.pax.cdi.spi.AbstractCdiContainer.start(AbstractCdiContainer.java:89) 
                              
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.createContainer(CdiExtender.java:132)[98:org.ops4j.pax.cdi.extende
r:0.11.0]                                                                                
                              
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.addingBundle(CdiExtender.java:86)[98:org.ops4j.pax.cdi.extender:0.
11.0]                                                                                    
                              
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.addingBundle(CdiExtender.java:44)[98:org.ops4j.pax.cdi.extender:0.
11.0]                                                                                    
                              
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)[karaf-org.osgi.core.jar:]
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)[karaf-org.osgi.core.jar:]
       at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf-org.osgi.core.jar:]
        
       at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf-org.osgi.core.jar:]
       
       at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)[karaf-org.osgi.core.jar:]
                   
       at org.ops4j.pax.cdi.extender.impl.CdiExtender.activate(CdiExtender.java:64)[98:org.ops4j.pax.cdi.extender:0.11.0
]                                                                                        
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_31]         
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
                     
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)  
                              
       at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)     
                              
       at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)
                             
       at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)        
                              
       at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:149)
                              
       at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.jav
a:315)                                                                                   
                              
       at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:127)
    
       at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:871)
         
       at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:838)
 
       at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:850)
       at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:419)
         
       at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java
:376)                                                                                    
                              
       at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:172)
             
       at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:120)
                 
       at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:258)         
                              
       at org.apache.felix.scr.impl.Activator.access$000(Activator.java:45)              
                              
       at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:185)     
                              
       at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
                  
       at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
                   
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:479)[karaf-org.osgi.core.jar
:]                                                                                       
                              
       at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:414)[karaf-org.osgi.core.jar
:]                                                                                       
                              
       at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[karaf-org.osgi.core.jar:]
              
       at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)[karaf-org.osgi.core.jar:]
  
       at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)[org.apa
che.felix.framework-4.2.1.jar:]                                                          
                              
       at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)[org.apache.feli
x.framework-4.2.1.jar:]                                                                  
                              
       at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)[org.apache.felix.fra
mework-4.2.1.jar:]                                                                       
                              
       at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]
     
       at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]
         
       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)               
                              
       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)               
                              
       at org.apache.karaf.features.internal.FeaturesServiceImpl.cleanUpOnFailure(FeaturesServiceImpl.java:531)
        
       at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:478)
         
       at org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:92)
  
       at org.apache.karaf.features.internal.BootFeaturesInstaller.start(BootFeaturesInstaller.java:76)
                
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_31]         
                              
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
                     
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[20:org.apache.aries.blueprin
t.core:1.4.2]                                                                            
                              
       at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[20:org.apache.aries.blueprint.core
:1.4.2]                                                                                  
                              
       at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[20:org.apache.aries.bluep
rint.core:1.4.2]                                                                         
                              
       at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[20:org.apache.aries.bluep
rint.core:1.4.2]                                                                         
                              
       at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[20:org.apache.aries.bluepr
int.core:1.4.2]                                                                          
                              
       at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[20:org.apache.aries.blueprint.core
:1.4.2]                                                                                  
                              
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_31]            
                              
       at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[20:org.apache.aries.blueprint.core
:1.4.2]                                                                                  
                              
       at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[20:org.
apache.aries.blueprint.core:1.4.2]                                                       
                              
       at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[20:org.apache
.aries.blueprint.core:1.4.2]                                                             
                              
       at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.
java:682)[20:org.apache.aries.blueprint.core:1.4.2]                                      
                              
       at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[20:org.apac
he.aries.blueprint.core:1.4.2]                                                           
                              
       at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[20:org.apache
.aries.blueprint.core:1.4.2]                                                             
                              
       at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)[20:org.apac
he.aries.blueprint.core:1.4.2]                                                           
                              
       at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:263)[20:org.apac
he.aries.blueprint.core:1.4.2]                                                           
                              
       at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:253)[20:org.apach
e.aries.blueprint.core:1.4.2]                                                            
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.
java:500)[14:org.apache.aries.util:1.1.0]                                                
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.
java:433)[14:org.apache.aries.util:1.1.0]                                                
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:
725)[14:org.apache.aries.util:1.1.0]                                                     
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:
463)[14:org.apache.aries.util:1.1.0]                                                     
                              
       at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:
422)[14:org.apache.aries.util:1.1.0]                                                     
                              
       at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.fr
amework-4.2.1.jar:]                                                                      
                              
       at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.
felix.framework-4.2.1.jar:]                                                              
                              
       at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.fra
mework-4.2.1.jar:]                                                                       
                              
       at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]
     
       at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]
         
       at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)[org.apache.felix.framework-4.2.1.jar:]
 
       at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.fram
ework-4.2.1.jar:]                                                                        
                              
       at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]                               
                              
Caused by: java.lang.reflect.InvocationTargetException                                   
                              
       at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)                    
                              
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
             
       at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]                    
                              
       at org.apache.webbeans.proxy.AbstractProxyFactory.defineAndLoadClass(AbstractProxyFactory.java:268)
             
       ... 105 more                                                                      
                              
Caused by: java.lang.NoClassDefFoundError: org/apache/webbeans/proxy/OwbNormalScopeProxy 
                              
       at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_31]                   
                              
       at java.lang.ClassLoader.defineClass(ClassLoader.java:760)[:1.8.0_31]             
                              
       at java.lang.ClassLoader.defineClass(ClassLoader.java:642)[:1.8.0_31]             
                              
       ... 109 more                                                                      
                              
Caused by: java.lang.ClassNotFoundException: org.apache.webbeans.proxy.OwbNormalScopeProxy
not found by org.apache.cxf.c
xf-core [125]                                                                            
                              
       at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
      
       at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
                             
       at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
          
       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_31]               
                              
       ... 112 more                                                                      
                              
2015-02-28 19:22:44,439 | ERROR | FelixStartLevel  | extender                         | 98
- org.ops4j.pax.cdi.extender 
- 0.11.0 | [CdiExtender(6)] Failed creating the component instance; see log for reason   
                              
{code} 

> CDI integration extension does not detect annotations on Karaf
> --------------------------------------------------------------
>
>                 Key: CXF-6221
>                 URL: https://issues.apache.org/jira/browse/CXF-6221
>             Project: CXF
>          Issue Type: Bug
>          Components: Integration, JAX-RS
>            Reporter: Krystian Panek
>            Assignee: Andriy Redko
>              Labels: cdi, extension, integration, karaf
>         Attachments: hydra.tar.gz, screenshot-1.png
>
>
> I am trying to use portable extension to get working CDI 1.2 and CXF 3.0.2 on Apache
Karaf. I wrapped it into OSGi bundle. I installed to my container also:
> * weld 2.1.1
> * pax-cdi-1.2
> * pax-cdi-1.2-web
> * pax-cdi-web-weld
> My JAXRS resources are not found by extension because some line from class **JAXRSCdiResourceExtension**
returns false even annotated element contains proper annotation but as a proxy (see attachment
image / screenshot from debugger).
> {code}
>         if (event.getAnnotated().isAnnotationPresent(ApplicationPath.class)) {
> {code}
> It would be nice,  to tell me how to get it working. I also tested CDI-1.1. Same situation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message