Hmm, I'm trying to resolve this but I'm running into different problems:
This is what my pom looked like:
<Require-Bundle>
org.apache.cxf.bundle,
org.springframework.beans
</Require-Bundle>
I tried to change it to:
<DynamicImport-Package>
org.apache.cxf.bundle,
org.springframework.beans
</DynamicImport-Package>
But I get the following error when I install the feature:
Cannot find class
[org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor] for bean
with name 'org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor'
defined in null; nested exception is java.lang.ClassNotFoundException:
org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor not found
from bundle [insurancedata]
So I tried this:
<DynamicImport-Package>
org.apache.cxf.bus.spring,
org.apache.cxf.bundle,
org.springframework.beans
</DynamicImport-Package>
But then I get this error:
2014-06-23 09:24:35,640 | WARN | xtenderThread-26 |
MBeanContainer | eclipse.jetty.jmx.MBeanContainer 305
| 59 - org.eclipse.jetty.util - 7.6.8.v20121106 | bean:
o.e.j.s.h.ContextHandler{/SoapContext,null}
org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service
proxy has been destroyed
at
org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:105)
at
org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83)
at
org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430)
at
org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415)
at
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:132)
at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:120)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at
org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:132)
at
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:120)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy6.registerMBean(Unknown Source)
at
org.eclipse.jetty.jmx.MBeanContainer.addBean(MBeanContainer.java:298)
at org.eclipse.jetty.jmx.MBeanContainer.add(MBeanContainer.java:146)
at org.eclipse.jetty.util.component.Container.add(Container.java:211)
at
org.eclipse.jetty.util.component.Container.update(Container.java:169)
at
org.eclipse.jetty.util.component.Container.update(Container.java:111)
at
org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:94)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:162)
at
org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:432)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:179)
at
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49)
at
org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:95)
at
org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:895)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:362)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.7.0_51]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)[77:org.springframework.beans:3.2.4.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[79:org.springframework.context:3.2.4.RELEASE]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[117:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[117:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[117:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[117:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[118:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
Any ideas what this means?
Regra
On 19.06.2014 20:44, Achim Nierbeck wrote:
Don't do that, require bundle is the worst you can do.
If you use that you loose all the benefits of OSGi.
Stick to the standard import and export maybe a dynamic-import every
now and than. But never ever use require bundle.
Regards, Achim
sent from mobile device
Am 19.06.2014 16:35 schrieb "Laci Gaspar" <[email protected]
<mailto:[email protected]>>:
Ok, just to close this... it was a problem with our deployment
server, so sorry for the disturbance.
But anyhow I learned that the Import-Package / Export-Package
elements are best left alone. What I needed was only the
<Require-Bundle> configuration in our pom.
Thanks and regards
Laci
On 19.06.2014 11:07, Achim Nierbeck wrote:
In such cases it sometimes help to issue the refresh command.
If you update a bundle another bundle using it, like a central
cxf or camel bundle (in case of camel the camel-core) are
still bound to the "old" uninstalled bundle. In those cases it
helps to refresh these bundles after an update of the bundle
containing either cxf or camel-routes.
In your case I'm not sure which bundle does actually stick to
an old one therefore do a general refresh, which does refresh
all bundles (it actually does a re-wiring of the bundles)
regards, Achim