users@glassfish.java.net

RE: Unable to bind new RMI URL for MBean ?

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Wed, 26 May 2010 06:28:26 -0400

look for the jmxri port in domain.xml and grant access in server.policy and client.policy

if in domain.xml the port is 9999
<jmx-connector port="9999">

grant access for rt.jar (the jar which contains javax.management.remote.rmi.RMIConnectorServer) to the connection on 9999

/domain1/config/server.policy
${java.home}/jre/lib/rt.jar

 grant codeBase "jar:file:${java.home}/jre/lib/rt.jar!/-" {
      permission java.net.SocketPermission "host:999", "connect,read,write";
 };

Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et
de confidentialité
 
Diese Nachricht ist vertraulich.
Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir
hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung
 einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche
Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails
koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


> Date: Wed, 26 May 2010 00:18:19 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Unable to bind new RMI URL for MBean ?
>
> Hi,
> I am getting 'java.rmi.AccessException: Cannot modify this registry" exception while starting the JMXConnectorServer, JMXConnectorServer.start() for MBean. I think the RMI registry is started as read only by Glassfish server?? . Could any one help me in solving it. I am using Glassfish V3 in Ubuntu.
>
> Stack trace:
> java.io.IOException: Cannot bind to URL [rmi://127.0.0.1:1099/jmxrmi/ra]: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
> java.rmi.AccessException: Cannot modify this registry]
> at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)
> at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417)
> at com.tietoenator.diameter.mbean.Register.<init>(Register.java:108)
> at com.tietoenator.diameter.ra.StackConnectionManager.MBeanRegister(StackConnectionManager.java:117)
> at com.tietoenator.diameter.ra.StackConnectionManager.<init>(StackConnectionManager.java:108)
> at com.tietoenator.diameter.ra.manager.TediaResourceAdapter.<init>(TediaResourceAdapter.java:90)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:92)
> at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:216)
> at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:337)
> at com.sun.enterprise.connectors.module.ConnectorDeployer.load(ConnectorDeployer.java:174)
> at com.sun.enterprise.connectors.module.ConnectorDeployer.load(ConnectorDeployer.java:82)
> at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
> at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
> at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:340)
> at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:151)
> at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
> at java.security.AccessController.doPrivileged(Native Method)
> at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
> at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
> at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
> at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)
> at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)
> at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)
> at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)
> at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)
> at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
> at org.jvnet.hk2.osgimain.Main.start(Main.java:140)
> at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
> at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
> at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
> java.rmi.AccessException: Cannot modify this registry]
> at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:126)
> at com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208)
> at javax.naming.InitialContext.bind(InitialContext.java:400)
> at javax.naming.InitialContext.bind(InitialContext.java:400)
> at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625)
> at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412)
> ... 44 more
> Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
> java.rmi.AccessException: Cannot modify this registry
> at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
> at sun.rmi.transport.Transport$1.run(Transport.java:159)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> 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.bind(Unknown Source)
> at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:120)
> ... 49 more
> Caused by: java.rmi.AccessException: Cannot modify this registry
> at sun.management.jmxremote.SingleEntryRegistry.bind(SingleEntryRegistry.java:61)
> at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
> at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
> at sun.rmi.transport.Transport$1.run(Transport.java:159)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> ... 1 more
>
> Thanks,
> Vasanth
> [Message sent by forum member 'mnvasanth']
>
> http://forums.java.net/jive/thread.jspa?messageID=471470
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3