Project: talendesb
Issue TESB-7139: Rest service using security does not work - missing OSGi import in manifest
{code} 22:11:42,201 | ERROR | xtenderThread-18 | BundleApplicationContextListener 50 | 95 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=unifiedplatform_520.HttpAuthenticationRestfulTestService, config=osgibundle:/META-INF/spring/*.xml)) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service': Cannot resolve reference to bean 'authenticationFilter' while setting bean property 'providers' with key [3]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.cxf.jaxrs.security.JAASAuthenticationFilter] for bean with name 'authenticationFilter' defined in URL [bundleentry://250.fwk2128911821/META-INF/spring/beans.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.security.JAASAuthenticationFilter not found from bundle [unifiedplatform_520.HttpAuthenticationRestfulTestService] org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[90:org.springframework.context:3.0.7.RELEASE] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[94:org.springframework.osgi.core:1.2.1] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[94:org.springframework.osgi.core:1.2.1] org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[94:org.springframework.osgi.core:1.2.1] org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[94:org.springframework.osgi.core:1.2.1] org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[95:org.springframework.osgi.extender:1.2.1] java.lang.Thread.run(Thread.java:680)[:1.6.0_35] Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.cxf.jaxrs.security.JAASAuthenticationFilter] for bean with name 'authenticationFilter' defined in URL [bundleentry://250.fwk2128911821/META-INF/spring/beans.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.security.JAASAuthenticationFilter not found from bundle [unifiedplatform_520.HttpAuthenticationRestfulTestService] org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1261)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:432)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)[88:org.springframework.beans:3.0.7.RELEASE]	... 19 more Caused by: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.security.JAASAuthenticationFilter not found from bundle [unifiedplatform_520.HttpAuthenticationRestfulTestService] org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)[94:org.springframework.osgi.core:1.2.1] org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)[94:org.springframework.osgi.core:1.2.1] java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_35] org.springframework.util.ClassUtils.forName(ClassUtils.java:257)[85:org.springframework.core:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1282)[88:org.springframework.beans:3.0.7.RELEASE] org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)[88:org.springframework.beans:3.0.7.RELEASE]	... 25 more Caused by: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.security.JAASAuthenticationFilter org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)[osgi-3.8.0.v20120529-1548.jar:] org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)[osgi-3.8.0.v20120529-1548.jar:] org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)[osgi-3.8.0.v20120529-1548.jar:] org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.8.0.v20120529-1548.jar:] java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_35] org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)[osgi-3.8.0.v20120529-1548.jar:] org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)[osgi-3.8.0.v20120529-1548.jar:] org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)[osgi-3.8.0.v20120529-1548.jar:] org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)[94:org.springframework.osgi.core:1.2.1]	... 31 more {code} Manifest looks like this (now find the package ... argh ... must reformat! :-) ): {code} Manifest-Version: 1.0 Export-Package: unifiedplatform_520.httpauthenticationrestfultestservi ce_0_4;uses:="org.dom4j,org.apache.cxf.jaxrs.ext,routines.system.api, org.apache.cxf.jaxrs.impl,javax.ws.rs.ext,javax.ws.rs.core,javax.ws.r s,javax.sql" Private-Package: lib,unifiedplatform_520.httpauthenticationrestfultest service_0_4.contexts,routines,routines.system,routines.system.api Bundle-ClassPath: .,lib/talend_file_enhanced_20070724.jar,lib/systemRo utines.jar,lib/camel-core-2.9.3.jar,lib/userRoutines.jar Tool: Bnd-2.0.0.20120907-102720 Bundle-Name: HttpAuthenticationRestfulTestService Created-By: 1.6.0_35 (Apple Inc.) Export-Service: routines.system.api.TalendJob;name=HttpAuthenticationR estfulTestService;type=job Bundle-Vendor: Talend Enterprise ESB (teesb_ce_5.2.0.NB_r91171) Bundle-Version: 0.4.0 Bnd-LastModified: 1348736177138 Bundle-ManifestVersion: 2 Import-Package: javax.management;resolution:=optional,javax.sql;resolu tion:=optional,javax.ws.rs;resolution:=optional,javax.ws.rs.core;reso lution:=optional,javax.ws.rs.ext;resolution:=optional,javax.xml.parse rs;resolution:=optional,javax.xml.transform;resolution:=optional,org. apache.camel;resolution:=optional,org.apache.camel.spi;resolution:=op tional,org.apache.cxf.endpoint;resolution:=optional,org.apache.cxf.he lpers;resolution:=optional,org.apache.cxf.jaxrs;resolution:=optional, org.apache.cxf.jaxrs.ext;resolution:=optional,org.apache.cxf.jaxrs.im pl;resolution:=optional,org.apache.cxf.jaxrs.lifecycle;resolution:=op tional,org.apache.cxf.jaxrs.provider.json;resolution:=optional,org.do m4j;resolution:=optional,org.dom4j.io;resolution:=optional,org.dom4j. tree;resolution:=optional,org.talend.fileprocess;resolution:=optional ,org.w3c.dom;resolution:=optional,org.xml.sax;resolution:=optional,su n.security.action;resolution:=optional,routines.system.api,org.apache .cxf.management.counters Bundle-SymbolicName: unifiedplatform_520.HttpAuthenticationRestfulTest Service {code}
Story points: 1