Spring-DM web extender cannot look up registered catalina osgi service. [message #666724] |
Thu, 21 April 2011 20:36  |
Eclipse User |
|
|
|
I am trying to run tomcat as an equinox osgi service, using a snapshot of spring dm v2.0.0.M2.
(I know it's dead, but I'll migrate to Virgo later -- I don't want to downgrade to spring dm 1.x.)
I am using the tomcat 6.0.32 -- plus dependent -- bundles just released with the SpringSource dm Server 2.0.5 distribution.
I attach a tomcat config fragment to com.springsource.osgi.webcontainer.tomcat 1.0.2, tomcat starts, and an osgi service is registered with name = 'com.springsource.osgi.webcontainer.core.spi.ServletContaine r'. (I think.)
When I manually start the spring dm web extender, the TomcatWarDeployer fails to locate the tomcat service in the osgi registry.
It is trying to locate the service via matching filter=[(objectClass=org.apache.catalina.Service)]. That's the wrong objectClass to filter on.
How can I override the way the catalina service is looked up in the spring-dm web extender?
I tried doing this in the spring bean config file in the extender fragment () but no go. I tried several variations on:
<osgi:reference id="catalinaService"
filter=(objectClass=com.springsource.osgi.webcontainer.core.spi.ServletContainer)"
interface="org.apache.catalina.Service" cardinality="0..1" />
Can anyone help me figure out what I'm doing wrong or what I need to do to override the catalina service lookup?
...
...
Stack Trace below is thrown by org.springframework.osgi.web.extender after tries to look up the catalina service using the wrong objectClass=org.apache.catalina.Service filter.
...
TomcatWarDeployer - No Catalina Service found, bailing out
org.springframework.osgi.service.ServiceUnavailableException : service matching filter=[(objectClass=org.apache.catalina.Service)] unavailable
at org.springframework.osgi.service.importer.support.internal.a op.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterce ptor.java:406)
at org.springframework.osgi.service.importer.support.internal.a op.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.osgi.service.importer.support.LocalBundl eContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke( JdkDynamicAopProxy.java:202)
at $Proxy7.getName(Unknown Source)
at org.springframework.osgi.web.deployer.tomcat.TomcatWarDeploy er.afterPropertiesSet(TomcatWarDeployer.java:91) ~[org.springframework.osgi.web_2.0.0.M2.jar:2.0.0.M2-SNAPSHO T]
at org.springframework.osgi.web.extender.internal.activator.War ListenerConfiguration.createDefaultWarDeployer(WarListenerCo nfiguration.java:197) [org.springframework.osgi.web.extender_2.0.0.M2.jar:2.0.0.M2 -SNAPSHOT]
at org.springframework.osgi.web.extender.internal.activator.War ListenerConfiguration. <init>(WarListenerConfiguration.java:105) [org.springframework.osgi.web.extender_2.0.0.M2.jar:2.0.0.M2 -SNAPSHOT]
at org.springframework.osgi.web.extender.internal.activator.War LoaderListener$1.run(WarLoaderListener.java:366) [org.springframework.osgi.web.extender_2.0.0.M2.jar:2.0.0.M2 -SNAPSHOT]
at java.lang.Thread.run(Thread.java:680) [na:1.6.0_24]
[110421-21:02:17.410 ERROR] o.s.o.w.e.i.a.WarLoaderListener - Cannot property start Spring DM WebExtender; stopping bundle...
org.springframework.osgi.OsgiException: Cannot create Tomcat deployer
at org.springframework.osgi.web.extender.internal.activator.War ListenerConfiguration.createDefaultWarDeployer(WarListenerCo nfiguration.java:201)
at org.springframework.osgi.web.extender.internal.activator.War ListenerConfiguration. <init>(WarListenerConfiguration.java:105)
at org.springframework.osgi.web.extender.internal.activator.War LoaderListener$1.run(WarLoaderListener.java:366)
at java.lang.Thread.run(Thread.java:680) [na:1.6.0_24]
Caused by: org.springframework.osgi.service.ServiceUnavailableException : service matching filter=[(objectClass=org.apache.catalina.Service)] unavailable
at org.springframework.osgi.service.importer.support.internal.a op.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterce ptor.java:406)
at org.springframework.osgi.service.importer.support.internal.a op.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.osgi.service.importer.support.LocalBundl eContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterc eptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation .proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke( JdkDynamicAopProxy.java:202)
at $Proxy7.getName(Unknown Source)
at org.springframework.osgi.web.deployer.tomcat.TomcatWarDeploy er.afterPropertiesSet(TomcatWarDeployer.java:91)
at org.springframework.osgi.web.extender.internal.activator.War ListenerConfiguration.createDefaultWarDeployer(WarListenerCo nfiguration.java:197)
... 3 common frames omitted
|
|
|
|
Powered by
FUDForum. Page generated in 0.09582 seconds