Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Spring-DM web extender cannot look up registered catalina osgi service. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring-DM web extender cannot look up registered catalina osgi service.

    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.Servl etContainer'. (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:

    Code:
    <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.ServiceUnavailabl eException: service matching filter=[(objectClass=org.apache.catalina.Service)] unavailable
    at org.springframework.osgi.service.importer.support. internal.aop.ServiceDynamicInterceptor.getTarget(S erviceDynamicInterceptor.java:406)
    at org.springframework.osgi.service.importer.support. internal.aop.ServiceInvoker.invoke(ServiceInvoker. java:62)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.doProceed(DelegatingIntroductionIn terceptor.java:131)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.invoke(DelegatingIntroductionInter ceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.osgi.service.importer.support. LocalBundleContextAdvice.invoke(LocalBundleContext Advice.java:59)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.doProceed(DelegatingIntroductionIn terceptor.java:131)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.invoke(DelegatingIntroductionInter ceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy7.getName(Unknown Source)
    at org.springframework.osgi.web.deployer.tomcat.Tomca tWarDeployer.afterPropertiesSet(TomcatWarDeployer. java:91) ~[org.springframework.osgi.web_2.0.0.M2.jar:2.0.0.M2-SNAPSHOT]
    at org.springframework.osgi.web.extender.internal.act ivator.WarListenerConfiguration.createDefaultWarDe ployer(WarListenerConfiguration.java:197) [org.springframework.osgi.web.extender_2.0.0.M2.jar :2.0.0.M2-SNAPSHOT]
    at org.springframework.osgi.web.extender.internal.act ivator.WarListenerConfiguration.<init>(WarListener Configuration.java:105) [org.springframework.osgi.web.extender_2.0.0.M2.jar :2.0.0.M2-SNAPSHOT]
    at org.springframework.osgi.web.extender.internal.act ivator.WarLoaderListener$1.run(WarLoaderListener.j ava: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.act ivator.WarListenerConfiguration.createDefaultWarDe ployer(WarListenerConfiguration.java:201)
    at org.springframework.osgi.web.extender.internal.act ivator.WarListenerConfiguration.<init>(WarListener Configuration.java:105)
    at org.springframework.osgi.web.extender.internal.act ivator.WarLoaderListener$1.run(WarLoaderListener.j ava:366)
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_24]
    Caused by: org.springframework.osgi.service.ServiceUnavailabl eException: service matching filter=[(objectClass=org.apache.catalina.Service)] unavailable
    at org.springframework.osgi.service.importer.support. internal.aop.ServiceDynamicInterceptor.getTarget(S erviceDynamicInterceptor.java:406)
    at org.springframework.osgi.service.importer.support. internal.aop.ServiceInvoker.invoke(ServiceInvoker. java:62)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.doProceed(DelegatingIntroductionIn terceptor.java:131)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.invoke(DelegatingIntroductionInter ceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.osgi.service.importer.support. LocalBundleContextAdvice.invoke(LocalBundleContext Advice.java:59)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.doProceed(DelegatingIntroductionIn terceptor.java:131)
    at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.invoke(DelegatingIntroductionInter ceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy7.getName(Unknown Source)
    at org.springframework.osgi.web.deployer.tomcat.Tomca tWarDeployer.afterPropertiesSet(TomcatWarDeployer. java:91)
    at org.springframework.osgi.web.extender.internal.act ivator.WarListenerConfiguration.createDefaultWarDe ployer(WarListenerConfiguration.java:197)
    ... 3 common frames omitted
Working...
X