You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David Bosschaert (JIRA)" <ji...@apache.org> on 2009/10/14 14:06:31 UTC

[jira] Issue Comment Edited: (CXF-2467) Remoted service fails to register endpoint after framework is restarted

    [ https://issues.apache.org/jira/browse/CXF-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765530#action_12765530 ] 

David Bosschaert edited comment on CXF-2467 at 10/14/09 5:06 AM:
-----------------------------------------------------------------

Hi Florian,

I tried to reproduce your issue with the Spring-DM demo that's part of the DOSGi code base. I also used Eclipse 3.5.1 as this is the version you are using.

First of all, I'm bootstrapping the Equinox container with a configuration file (config.ini in the Equinox configuration directory). I've attached mine to this bug FYI. Since some of the CXF-DOSGi third-party libs don't use OSGi services for their dependencies, they need to be started in the right order. I can't fully recall for which bundles this is necessary but I think they're in the ones pulled in via geronimo or servicemix.
By putting in a config.ini file like the attached, Equinox will start all the bundles in the specified order. You can obviously also use start levels to achieve the same.

After booting up Equinox with the specified config.ini, I'm installing the Spring-DM demo. I've changed it to use the exact same properties as you report in the bug. 
It works (you will get the WSDL when going to http://localhost:8080/hello?wsdl) and after shutting down and restarting it still works for me. I've attached the bundles from the demo that I used to the bug, so you could try this out as well.

BTW, the multi-bundle distro contains two files in the conf/ directory that you can use as a starting point for your config.ini/config.properties file. There's one for Equinox and another one for Felix. You can also simply append these files to the Equinox or Felix configuration files if you have one already.

Oh, and finally, to be complete, these are the bundles that I have. Most of them are pulled in from the config.ini file. Only the last two are installed from the Equinox console with the install command. They are the two bundles belonging to the Spring-DM demo...

0       ACTIVE      org.eclipse.osgi_3.5.1.R35x_v20090827
1       ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
3       ACTIVE      org.apache.geronimo.specs.geronimo-annotation_1.0_spec_1.1.1
4       ACTIVE      org.apache.geronimo.specs.geronimo-activation_1.1_spec_1.0.2
5       ACTIVE      org.apache.geronimo.specs.geronimo-javamail_1.4_spec_1.2.0
6       ACTIVE      org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec_1.1.2
7       ACTIVE      com.springsource.org.apache.commons.logging_1.1.1
8       ACTIVE      com.springsource.org.jdom_1.0.0
9       ACTIVE      org.springframework.core_2.5.6
10      ACTIVE      org.springframework.beans_2.5.6
11      ACTIVE      org.springframework.context_2.5.6
12      ACTIVE      com.springsource.org.aopalliance_1.0.0
13      ACTIVE      org.springframework.aop_2.5.6
14      ACTIVE      org.springframework.osgi.io_1.2.0
15      ACTIVE      org.springframework.osgi.core_1.2.0
16      ACTIVE      org.springframework.osgi.extender_1.2.0
17      ACTIVE      org.ops4j.pax.web.service_0.5.1
18      ACTIVE      org.apache.servicemix.bundles.jaxb-impl_2.1.6.1
19      ACTIVE      org.apache.servicemix.bundles.wsdl4j_1.6.1.1
20      ACTIVE      org.apache.servicemix.bundles.xmlsec_1.3.0.1
21      ACTIVE      org.apache.servicemix.bundles.xmlschema_1.4.3.1
22      ACTIVE      org.apache.servicemix.bundles.asm_2.2.3.1
23      ACTIVE      org.apache.servicemix.bundles.xmlresolver_1.2.0.1
24      ACTIVE      org.apache.servicemix.bundles.neethi_2.0.4.1
25      ACTIVE      org.apache.servicemix.bundles.woodstox_3.2.7.1
26      ACTIVE      org.apache.cxf.bundle-minimal_2.2.3
27      ACTIVE      org.apache.servicemix.specs.saaj-api-1.3_1.3.0
28      ACTIVE      org.apache.servicemix.specs.stax-api-1.0_1.3.0
29      ACTIVE      org.apache.servicemix.specs.jaxb-api-2.1_1.3.0
30      ACTIVE      org.apache.servicemix.specs.jaxws-api-2.1_1.3.0
31      ACTIVE      org.apache.servicemix.specs.jsr311-api-1.0_1.3.0
32      ACTIVE      cxf-dosgi-ri-discovery-local_1.1.0.SNAPSHOT
33      ACTIVE      cxf-dosgi-ri-dsw-cxf_1.1.0.SNAPSHOT
37      ACTIVE      cxf-dosgi-ri-samples-spring-dm-impl_1.1.0.SNAPSHOT
38      ACTIVE      cxf-dosgi-ri-samples-spring-dm-interface_1.1.0.SNAPSHOT

      was (Author: bosschaert):
    Hi Florian,

I tried to reproduce your issue with the Spring-DM demo that's part of the DOSGi code base. I also used Eclipse 3.5.1 as this is the version you are using.

First of all, I'm bootstrapping the Equinox container with a configuration file (config.ini in the Equinox configuration directory). I've attached mine to this bug FYI. Since some of the CXF-DOSGi third-party libs don't use OSGi services for their dependencies, they need to be started in the right order. I can't fully recall for which bundles this is necessary but I think they're in the ones pulled in via geronimo or servicemix.
By putting in a config.ini file like the attached, Equinox will start all the bundles in the specified order. You can obviously also use start levels to achieve the same.

After booting up Equinox with the specified config.ini, I'm installing the Spring-DM demo. I've changed it to use the exact same properties as you report in the bug. 
It works (you will get the WSDL when going to http://localhost:8080/hello?wsdl) and after shutting down and restarting it still works for me. I've attached the bundles from the demo that I used to the bug, so you could try this out as well.

BTW, the multi-bundle distro contains two files in the conf/ directory that you can use as a starting point for your config.ini/config.properties file. There's one for Equinox and another one for Felix. You can also simply append these files to the Equinox or Felix configuration files if you have one already.

Oh, and finally, to be complete, these are the bundles that I have. Most of them are pulled in from the config.ini file. Only the last two are installed from the Equinox console with the install command. They are the two bundles belonging to the Spring-DM demo...

0       ACTIVE      org.eclipse.osgi_3.5.1.R35x_v20090827
1       ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
3       ACTIVE      org.apache.geronimo.specs.geronimo-annotation_1.0_spec_1.1.1

4       ACTIVE      org.apache.geronimo.specs.geronimo-activation_1.1_spec_1.0.2

5       ACTIVE      org.apache.geronimo.specs.geronimo-javamail_1.4_spec_1.2.0
6       ACTIVE      org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec_1.1.
2
7       ACTIVE      com.springsource.org.apache.commons.logging_1.1.1
8       ACTIVE      com.springsource.org.jdom_1.0.0
9       ACTIVE      org.springframework.core_2.5.6
10      ACTIVE      org.springframework.beans_2.5.6
11      ACTIVE      org.springframework.context_2.5.6
12      ACTIVE      com.springsource.org.aopalliance_1.0.0
13      ACTIVE      org.springframework.aop_2.5.6
14      ACTIVE      org.springframework.osgi.io_1.2.0
15      ACTIVE      org.springframework.osgi.core_1.2.0
16      ACTIVE      org.springframework.osgi.extender_1.2.0
17      ACTIVE      org.ops4j.pax.web.service_0.5.1
18      ACTIVE      org.apache.servicemix.bundles.jaxb-impl_2.1.6.1
19      ACTIVE      org.apache.servicemix.bundles.wsdl4j_1.6.1.1
20      ACTIVE      org.apache.servicemix.bundles.xmlsec_1.3.0.1
21      ACTIVE      org.apache.servicemix.bundles.xmlschema_1.4.3.1
22      ACTIVE      org.apache.servicemix.bundles.asm_2.2.3.1
23      ACTIVE      org.apache.servicemix.bundles.xmlresolver_1.2.0.1
24      ACTIVE      org.apache.servicemix.bundles.neethi_2.0.4.1
25      ACTIVE      org.apache.servicemix.bundles.woodstox_3.2.7.1
26      ACTIVE      org.apache.cxf.bundle-minimal_2.2.3
27      ACTIVE      org.apache.servicemix.specs.saaj-api-1.3_1.3.0
28      ACTIVE      org.apache.servicemix.specs.stax-api-1.0_1.3.0
29      ACTIVE      org.apache.servicemix.specs.jaxb-api-2.1_1.3.0
30      ACTIVE      org.apache.servicemix.specs.jaxws-api-2.1_1.3.0
31      ACTIVE      org.apache.servicemix.specs.jsr311-api-1.0_1.3.0
32      ACTIVE      cxf-dosgi-ri-discovery-local_1.1.0.SNAPSHOT
33      ACTIVE      cxf-dosgi-ri-dsw-cxf_1.1.0.SNAPSHOT
37      ACTIVE      cxf-dosgi-ri-samples-spring-dm-impl_1.1.0.SNAPSHOT
38      ACTIVE      cxf-dosgi-ri-samples-spring-dm-interface_1.1.0.SNAPSHOT
  
> Remoted service fails to register endpoint after framework is restarted
> -----------------------------------------------------------------------
>
>                 Key: CXF-2467
>                 URL: https://issues.apache.org/jira/browse/CXF-2467
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.0
>         Environment: Windows XP, equinox, Spring
>            Reporter: Florian Grunow
>            Assignee: David Bosschaert
>         Attachments: config.ini, cxf-dosgi-ri-samples-spring-dm-impl-1.1-SNAPSHOT.jar, cxf-dosgi-ri-samples-spring-dm-interface-1.1-SNAPSHOT.jar
>
>
> When re-booting the framework the remoted osgi bundles start successfully but fail to get their endpoints registered. When deleting the framework's cache and on the very first start of the framework, everything works fine, the service endpoints are created and the wsdl is exposed. So this happens only after a reboot of the framework. The bundle (hello-remote-srv) is a very simple hello world service activated with a spring configuration. 
> See exception details, configuration and versions below:
> [...]
> 13.10.2009 13:42:51 org.apache.cxf.transport.servlet.CXFNonSpringServlet loadBusNoConfig
> INFO: Load the bus without application context
> Exception in thread "pool-1-thread-3" java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "o
> rg.springframework.beans.factory.support.AbstractBeanFactory.getParentBeanFactory()Lorg/springframework/beans/factory/BeanFactory;" the class loader (
> instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/springframework/beans/factory/support/AbstractBeanFact
> ory, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface org/springframework/beans/factory/Hiera
> rchicalBeanFactory have different Class objects for the type org/springframework/beans/factory/BeanFactory used in the signature
>         at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:176)
>         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:121
> )
>         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
>         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBusNoConfig(CXFNonSpringServlet.java:45)
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBus(CXFNonSpringServlet.java:38)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:79)
>         at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
>         at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
>         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>         at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616)
>         at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:984)
>         at org.mortbay.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1041)
>         at org.mortbay.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:740)
>         at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServerImpl.java:129)
>         at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServerImpl.java:126)
>         at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)
>         at org.ops4j.pax.web.service.internal.JettyServerImpl.addServlet(JettyServerImpl.java:121)
>         at org.ops4j.pax.web.service.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:214)
>         at org.ops4j.pax.web.service.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:90)
>         at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:144)
>         at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:53)
>         at org.apache.cxf.dosgi.dsw.handlers.HttpServiceConfigurationTypeHandler.createServer(HttpServiceConfigurationTypeHandler.java:92)
>         at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceHookUtils.java:86)
>         at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublishHook.java:106)
>         at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPublishHook.java:80)
>         at org.apache.cxf.dosgi.dsw.Activator$1.run(Activator.java:144)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> osgi> ss
> Framework is launched.
> id      State       Bundle
> 0       ACTIVE      org.eclipse.osgi_3.5.1.R35x_v20090827
> 1       ACTIVE      com.springsource.net.sf.cglib_2.1.3
> 2       ACTIVE      com.springsource.org.aopalliance_1.0.0
> 3       ACTIVE      com.springsource.org.apache.commons.logging_1.1.1
> 4       ACTIVE      com.springsource.org.jdom_1.0.0
> 5       ACTIVE      com.springsource.org.objectweb.asm_2.2.3
> 6       ACTIVE      cxf-dosgi-ri-singlebundle-distribution_1.0.0
> 7       ACTIVE      biz.aQute.fileinstall_1.3.4
> 8       ACTIVE      org.eclipse.equinox.common_3.5.0.v20090520-1800
> 9       ACTIVE      org.eclipse.equinox.event_1.1.0.v20080225
> 10      ACTIVE      org.eclipse.equinox.launcher_1.0.200.v20090520
> 11      ACTIVE      org.eclipse.equinox.log_1.1.0.v20080414
> 12      ACTIVE      org.eclipse.equinox.preferences_3.2.300.v20090520-1800
> 13      ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
> 14      ACTIVE      org.eclipse.osgi.util_3.2.0.v20090520-1800
> 15      ACTIVE      org.springframework.aop_2.5.6
> 16      ACTIVE      org.springframework.beans_2.5.6
> 17      ACTIVE      org.springframework.context.support_2.5.6
> 18      ACTIVE      org.springframework.context_2.5.6
> 19      ACTIVE      org.springframework.core_2.5.6
> 20      ACTIVE      org.springframework.osgi.core_1.2.0
> 21      ACTIVE      org.springframework.osgi.extender_1.2.0
> 22      ACTIVE      org.springframework.osgi.extensions.annotations_1.2.0
> 23      ACTIVE      org.springframework.osgi.io_1.2.0
> 24      ACTIVE      hello-remote-srv_0.0.0.SNAPSHOT
> Spring config:
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:osgi="http://www.springframework.org/schema/osgi"
>     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>     http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
> 	<bean id="HelloServImpl" class="hello.remote.srv.HelloWorldSrvImpl" />
> 	
> 	<osgi:service ref="HelloServImpl" interface="hello.remote.srv.HelloWorldSrvI">
> 		<osgi:service-properties >
> 			<entry key="vendor" value="test" />
> 			<entry key="implementation" value="PojoConfigurableService" />
> 			<entry key="implVersion" value="1.0" />
> 			<entry key="service.exported.interfaces" value="*" />
> 			<entry key="osgi.remote.interfaces" value="*" />
> 			<entry key="service.exported.configs" value="org.apache.cxf.ws" />
> 			<entry key="remotable" value="true" />
> 			<entry key="osgi.remote.configuration.pojo.httpservice.context"
> 				value="/hello" />
> 		</osgi:service-properties>
> 	</osgi:service>
> </beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.