Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Spring-DM web extender cannot look up registered catalina osgi service.
Spring-DM web extender cannot look up registered catalina osgi service. [message #666724] Fri, 22 April 2011 00:36 Go to next message
Stan is currently offline StanFriend
Messages: 3
Registered: July 2009
Junior Member
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
Re: Spring-DM web extender cannot look up registered catalina osgi service. [message #667048 is a reply to message #666724] Tue, 26 April 2011 14:58 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
This is a Spring DM question, so please refer to the corresponding thread on the Spring DM forum.
Previous Topic:Simple Virgo Web application bundle
Next Topic:Milestone 3.0.0.M04 is out
Goto Forum:
  


Current Time: Thu Apr 25 14:01:27 GMT 2024

Powered by FUDForum. Page generated in 0.02922 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top