You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "S. Ali Tokmen (JIRA)" <ji...@apache.org> on 2009/05/29 11:50:45 UTC

[jira] Updated: (FELIX-1188) RmiConnectorActivator.stop throws exception and prints stack trace

     [ https://issues.apache.org/jira/browse/FELIX-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

S. Ali Tokmen updated FELIX-1188:
---------------------------------

    Attachment: FELIX-1188.patch

Behavior detailed in http://download.java.net/jdk7/docs/api/javax/management/remote/rmi/RMIConnectorServer.html#stop()

Solution is simple:

1. Call stop()
2. If there were pending connections, stop() closes all of them but throws an IOException
3. Catch the exception and call stop() again
4. This time, it should not throw anything and stop successfully

Patch attached

> RmiConnectorActivator.stop throws exception and prints stack trace
> ------------------------------------------------------------------
>
>                 Key: FELIX-1188
>                 URL: https://issues.apache.org/jira/browse/FELIX-1188
>             Project: Felix
>          Issue Type: Bug
>          Components: MOSGi
>         Environment: SVN Revision 447866
>            Reporter: S. Ali Tokmen
>         Attachments: FELIX-1188.patch
>
>
> When stopping the MOSGi RMI registry bundle when there are pending JMX connections, it throws:
> java.io.IOException: Cannot bind to URL: javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
>         at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)
>         at javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:555)
>         at org.apache.felix.mosgi.jmx.rmiconnector.RmiConnectorActivator.stopRmiConnector(RmiConnectorActivator.java:196)
>         at org.apache.felix.mosgi.jmx.rmiconnector.RmiConnectorActivator.serviceChanged(RmiConnectorActivator.java:105)
>         at org.apache.felix.framework.util.EventDispatcher$4.run(EventDispatcher.java:838)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:835)
>         at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:704)
>         at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:635)
>         at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3420)
>         at org.apache.felix.framework.Felix.access$000(Felix.java:39)
>         at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:622)
>         at org.apache.felix.framework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:576)
>         at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:110)
>         at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:120)
>         at org.apache.felix.mosgi.jmx.registry.mx4j.tools.naming.NamingService.stop(NamingService.java:75)
>         at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1119)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:602)
>         at org.apache.felix.framework.Felix.stopBundle(Felix.java:1815)
>         at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1001)
>         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:263)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
>         at com.sun.jndi.rmi.registry.RegistryContext.unbind(RegistryContext.java:160)
>         at com.sun.jndi.toolkit.url.GenericURLContext.unbind(GenericURLContext.java:254)
>         at javax.naming.InitialContext.unbind(InitialContext.java:416)
>         at javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:547)
>         ... 21 more
> Caused by: java.rmi.NoSuchObjectException: no such object in table
>         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
>         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
>         at sun.rmi.registry.RegistryImpl_Stub.unbind(Unknown Source)
>         at com.sun.jndi.rmi.registry.RegistryContext.unbind(RegistryContext.java:156)
>         ... 24 more
> That behavior is detailed in http://download.java.net/jdk7/docs/api/javax/management/remote/rmi/RMIConnectorServer.html#stop()

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