cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amichai Rothman (JIRA)" <>
Subject [jira] [Commented] (DOSGI-165) exported service is not properly closed and cannot be restarted
Date Fri, 05 Apr 2013 14:35:16 GMT


Amichai Rothman commented on DOSGI-165:

You are correct - the main fix is that one line. As for the duplicates - if this is indeed
possible (I honestly don't know), it should probably be de-duplicated earlier, such as in
the getInterfaces() method, rather than after it has been processed, a duplicate server has
been created (which may fail) etc. Currently it goes through all the motions, and then just
drops the reference, which is probably a resource leak (server isn't closed?).
> exported service is not properly closed and cannot be restarted
> ---------------------------------------------------------------
>                 Key: DOSGI-165
>                 URL:
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>          Components: DSW
>    Affects Versions: 1.4.0
>         Environment: Oracle JDK 1.7.0_17, Karaf 2.3.1, DOSGi 1.4.0
>            Reporter: Amichai Rothman
>            Assignee: Christian Schneider
>             Fix For: 1.5
>         Attachments: fix_server_not_stopped.diff
> I have a bundle that exports a service via DOSGi. Once the bundle is started, I can point
a browser to the exported URL and see the service is up and running. However, if the bundle
is now stopped, the service at the URL is still there! Finally, if the bundle is now started
again, it fails with an error about the endpoint already existing (stack trace below).
> The issue appears to be that the server is never stopped even when the service is unregistered,
since the server reference isn't passed to the ExportRegistrationImpl that is later closed.
> A proposed patch is attached which fixes this (plus, for good measure, it cleans up the
code by replacing a locally used Map with a List since only the map values are ever used.)
> java.lang.RuntimeException: Soap 1.1 endpoint already registered on address
>         at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(
>         at org.apache.cxf.endpoint.ServerImpl.start([164:org.apache.cxf.cxf-api:2.7.2]
>         at org.apache.cxf.frontend.ServerFactoryBean.create([172:org.apache.cxf.cxf-rt-frontend-simple:2.7.2]
>         at org.apache.cxf.dosgi.dsw.handlers.AbstractPojoConfigurationTypeHandler.createServerFromFactory([56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.handlers.PojoConfigurationTypeHandler.createServer([56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService([56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at Method)[:1.7.0_17]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService([56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService([56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.doExportService([72:cxf-dosgi-ri-topology-manager:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.access$300([72:cxf-dosgi-ri-topology-manager:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport$[72:cxf-dosgi-ri-topology-manager:1.5.0.SNAPSHOT]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker([:1.7.0_17]
>         at java.util.concurrent.ThreadPoolExecutor$[:1.7.0_17]
>         at[:1.7.0_17]

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message