You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2013/04/05 15:36:16 UTC

[jira] [Commented] (DOSGI-165) exported service is not properly closed and cannot be restarted

    [ https://issues.apache.org/jira/browse/DOSGI-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623620#comment-13623620 ] 

Christian Schneider commented on DOSGI-165:
-------------------------------------------

Am I correct that the real fix is the line "exportRegistration.setServer(exportResult.getServer());" ?

I am hesitant to apply the conversion from Map to List to as the map may be used to avoid duplicates. I will do some more investigation.

                
> exported service is not properly closed and cannot be restarted
> ---------------------------------------------------------------
>
>                 Key: DOSGI-165
>                 URL: https://issues.apache.org/jira/browse/DOSGI-165
>             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 http://192.168.1.1:9000/my/test/TestService
>         at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:921)
>         at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)[164:org.apache.cxf.cxf-api:2.7.2]
>         at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:204)[172:org.apache.cxf.cxf-rt-frontend-simple:2.7.2]
>         at org.apache.cxf.dosgi.dsw.handlers.AbstractPojoConfigurationTypeHandler.createServerFromFactory(AbstractPojoConfigurationTypeHandler.java:208)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.handlers.PojoConfigurationTypeHandler.createServer(PojoConfigurationTypeHandler.java:118)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:119)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:64)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:58)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_17]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:58)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:37)[56:cxf-dosgi-ri-dsw-cxf:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.doExportService(TopologyManagerExport.java:249)[72:cxf-dosgi-ri-topology-manager:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.access$300(TopologyManagerExport.java:50)[72:cxf-dosgi-ri-topology-manager:1.5.0.SNAPSHOT]
>         at org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport$3.run(TopologyManagerExport.java:214)[72:cxf-dosgi-ri-topology-manager:1.5.0.SNAPSHOT]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_17]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_17]
>         at java.lang.Thread.run(Thread.java:722)[: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: http://www.atlassian.com/software/jira