Java.rmi.AccessException: Registry.Registry.rebind disallowed
I am getting the following error while creating a client socket. I am not exactly sure what is causing the problem.
This is happening on windows 2k3 sp2 French dual stack machine.
java.rmi.AccessException: Registry.Registry.rebind disallowed; origin /fe80:0:0:0:219:b9ff:fe00:d81d is non-local host:java.rmi.AccessException: Registry.Registry.rebind disallowed; origin /fe80:0:0:0:219:b9ff:fe00:d81d is non-local host
And also I observed the server socket is something different to the normal one ..
ServerSocket[addr=::/0:0:0:0:0:0:0:0,port=0,localport=11501
Normally it will be 0.0.0.0/0.0.0.0. I don't know why it is different....
Any pointers why I am getting that exception and the server socket is =::/0:0:0:0:0:0:0:0?
Edited by: shash10 on Jun 9, 2008 12:07 AM
Edited by: shash10 on Jun 9, 2008 12:36 AM
I am getting the following error while creating a client socket.No, you're getting it while calling Registry.rebind(), because you're doing that from a client that isn't on the same host as the Registry, and that's illegal, as the exception text says. Nothing to do with IPv6 actually.
Similar Messages
-
JMXConnectorServer.start() causes java.rmi.AccessException
Hi all,
I've already posted this message to the tomcat mailing list as well as to the jmx forum, but without any result.
I've a web service running inside tomcat which
creates the jmx stuff needed to manage resources:
LocateRegistry.createRegistry(port);
String localhost = InetAddress.getLocalHost().getCanonicalHostName();
MBeanServer mbs = MBeanServerFactory.createMBeanServer();
// it is the same with getPlatformMBean
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + localhost + ":"
+ port + "/qosp");
JMXConnectorServer cs =
JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
cs.start();The problem is that I get a java.rmi.AcessException -- see below -- when the cs.start() call is executed (on linux machines only -- it works fine on Windows)
The problem seems to be the following:
Caused by: java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host
However my machine does not have that address, and actually I have no idea what it is.
Any clue?
Michele
Nov 6, 2006 11:55:01 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: .:/Library/Java/Extensions:/System/Library/Java/
Extensions:/usr/lib/java
Nov 6, 2006 11:55:01 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 6, 2006 11:55:01 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 666 ms
Nov 6, 2006 11:55:02 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 6, 2006 11:55:02 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
Nov 6, 2006 11:55:02 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 6, 2006 11:55:02 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive axis2.war
2006-11-06 11:55:03,668 INFO
org.apache.axis2.deployment.DeploymentEngine - Deploying module :
addressing-1.1
2006-11-06 11:55:03,682 INFO
org.apache.axis2.deployment.DeploymentEngine - Deploying module :
managerInterceptor
2006-11-06 11:55:03,690 INFO
org.apache.axis2.deployment.DeploymentEngine - Deploying module :
soapmonitor-1.1
2006-11-06 11:55:03,890 INFO ncl.qosp.controller.LifecycleSupport -
Qosp jmx is starting up...
org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules Unable to start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules Unable to start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processService
Group(ArchiveReader.java:124)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy
(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update
(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update
(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices
(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices
(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices
(WarBasedAxisConfigurator.java:252)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext
(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:
317)
at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup
(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4176)
at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:
804)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:
693)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
442)
at org.apache.catalina.core.StandardService.start
(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:
700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.axis2.deployment.DeploymentException:
Processing Operations Modules Unable to start the connector; nested
exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
at org.apache.axis2.deployment.ServiceBuilder.populateService
(ServiceBuilder.java:320)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr
oup(ArchiveReader.java:76)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processService
Group(ArchiveReader.java:118)
... 35 more
Caused by: org.apache.axis2.deployment.DeploymentException: Unable to
start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
at
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
(ServiceBuilder.java:349)
at org.apache.axis2.deployment.ServiceBuilder.populateService
(ServiceBuilder.java:127)
... 37 more
Caused by: java.lang.RuntimeException: Unable to start the connector
at ncl.qosp.controller.LifecycleSupport.initRemoteJmx
(LifecycleSupport.java:192)
at ncl.qosp.controller.LifecycleSupport.startUp
(LifecycleSupport.java:132)
at
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
(ServiceBuilder.java:345)
... 38 more
Caused by: java.io.IOException: Cannot bind to URL [rmi://
sealbook.ncl.ac.uk:10099/qosp]: javax.naming.NoPermissionException
[Root exception is java.rmi.ServerException: RemoteException occurred
in server thread; nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host]
at javax.management.remote.rmi.RMIConnectorServer.newIOException
(RMIConnectorServer.java:814)
at javax.management.remote.rmi.RMIConnectorServer.start
(RMIConnectorServer.java:431)
at ncl.qosp.controller.LifecycleSupport.initRemoteJmx
(LifecycleSupport.java:190)
... 40 more
Caused by: javax.naming.NoPermissionException [Root exception is
java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host]
at com.sun.jndi.rmi.registry.RegistryContext.bind
(RegistryContext.java:122)
at com.sun.jndi.toolkit.url.GenericURLContext.bind
(GenericURLContext.java:208)
at javax.naming.InitialContext.bind(InitialContext.java:359)
at javax.management.remote.rmi.RMIConnectorServer.bind
(RMIConnectorServer.java:635)
at javax.management.remote.rmi.RMIConnectorServer.start
(RMIConnectorServer.java:427)
... 41 more
Caused by: java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:
385)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:613)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer
(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall
(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.bind
(RegistryContext.java:116)
... 45 more
Caused by: java.rmi.AccessException: Registry.Registry.bind
disallowed; origin /128.240.229.70 is non-local host
at sun.rmi.registry.RegistryImpl.checkAccess(RegistryImpl.java:223)
at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:119)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:
375)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:613)
2006-11-06 11:55:04,041 ERROR
org.apache.axis2.deployment.DeploymentEngine - Invalid service
RoutingService.aar due to Processing Operations Modules Unable to
start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules Unable to start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules Unable to start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules Unable to start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processService
Group(ArchiveReader.java:124)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy
(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update
(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update
(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices
(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices
(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices
(WarBasedAxisConfigurator.java:252)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext
(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:
317)
at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load
(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup
(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4176)
at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:
804)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:
693)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
442)
at org.apache.catalina.core.StandardService.start
(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:
700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.axis2.deployment.DeploymentException:
Processing Operations Modules Unable to start the connector; nested
exception is:
java.lang.RuntimeException: Unable to start the connector; nested
exception is:
org.apache.axis2.deployment.DeploymentException: Unable to start the
connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
at org.apache.axis2.deployment.ServiceBuilder.populateService
(ServiceBuilder.java:320)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr
oup(ArchiveReader.java:76)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processService
Group(ArchiveReader.java:118)
... 35 more
Caused by: org.apache.axis2.deployment.DeploymentException: Unable to
start the connector; nested exception is:
java.lang.RuntimeException: Unable to start the connector
at
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
(ServiceBuilder.java:349)
at org.apache.axis2.deployment.ServiceBuilder.populateService
(ServiceBuilder.java:127)
... 37 more
Caused by: java.lang.RuntimeException: Unable to start the connector
at ncl.qosp.controller.LifecycleSupport.initRemoteJmx
(LifecycleSupport.java:192)
at ncl.qosp.controller.LifecycleSupport.startUp
(LifecycleSupport.java:132)
at
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
(ServiceBuilder.java:345)
... 38 more
Caused by: java.io.IOException: Cannot bind to URL [rmi://
sealbook.ncl.ac.uk:10099/qosp]: javax.naming.NoPermissionException
[Root exception is java.rmi.ServerException: RemoteException occurred
in server thread; nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host]
at javax.management.remote.rmi.RMIConnectorServer.newIOException
(RMIConnectorServer.java:814)
at javax.management.remote.rmi.RMIConnectorServer.start
(RMIConnectorServer.java:431)
at ncl.qosp.controller.LifecycleSupport.initRemoteJmx
(LifecycleSupport.java:190)
... 40 more
Caused by: javax.naming.NoPermissionException [Root exception is
java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host]
at com.sun.jndi.rmi.registry.RegistryContext.bind
(RegistryContext.java:122)
at com.sun.jndi.toolkit.url.GenericURLContext.bind
(GenericURLContext.java:208)
at javax.naming.InitialContext.bind(InitialContext.java:359)
at javax.management.remote.rmi.RMIConnectorServer.bind
(RMIConnectorServer.java:635)
at javax.management.remote.rmi.RMIConnectorServer.start
(RMIConnectorServer.java:427)
... 41 more
Caused by: java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /
128.240.229.70 is non-local host
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:
385)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:613)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer
(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall
(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.bind
(RegistryContext.java:116)
... 45 more
Caused by: java.rmi.AccessException: Registry.Registry.bind
disallowed; origin /128.240.229.70 is non-local host
at sun.rmi.registry.RegistryImpl.checkAccess(RegistryImpl.java:223)
at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:119)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:
375)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:613)
2006-11-06 11:55:04,180 INFO
org.apache.axis2.deployment.DeploymentEngine - Deploying Web service
version.aar
Nov 6, 2006 11:55:04 AM org.apache.coyote.http11.Http11BaseProtocol
start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 6, 2006 11:55:04 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 6, 2006 11:55:04 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/26 config=null
Nov 6, 2006 11:55:04 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Nov 6, 2006 11:55:04 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2979 msIs it possible that
InetAddress.getLocalHost().getCanonicalHostName() is
returning a bogus name? Could you replace it with
.getHostName()?Yes, I did it, but nothing changed, so I tried to hardcode the 'localhost' when I create the JMXServiceURL instead of using the value returned by InetAddress.getLocalHost().get* and it worked.
Could it be because of network settings (I'm running behind a proxy)?
Thanks,
Michele -
Hello. I'm hoping someone can give me a clue to the source of this problem.
I have a very simple test application which consists of one EJB which is just a stateless session bean that has a method which return the String "Hello". This method can only be run by a user in the "test" role.
I have a simple commandline client packaged in the application. I use deploytool to extract the Client.jar and I can run it with appclient - client myClient.jar. This little class connects to the bean in the server (via jndi lookup as per all tutorial example) and calls the sayHello() method. A login dialog appears in order to authenticate the user as it should and everything works perfectly ... BUT ...
If I stop the server and start it again and try to run the client exactly the same way (appclient - client myClient.jar), I get the error message below. The application is running and I confirm that its there using deploytool and asadmin to list components, etc. The only way I can get it work again is by redeploying the application.
I've looked around and found nothing about this regarding Sun Java System Application Server Platform Edition 8 2004Q4 Beta (which is what I'm using). I found some vague references to a similar sounding problem from people using Application Server 7, but the work around in those posts references switches and settings in deploytool that dont seem to be there in my version.
Can anyone suggest a fix? I'd like the application to work upon starting up the server each morning for example without having to redeploy it. I'm glad to provide my test application archives and sources to anyone who would find them useful for solving this problem.
Thanks!
Error:
java.rmi.AccessException: CORBA NO_PERMISSION 9998 Maybe; nested exception is:
org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:179)
at com.sun.ejb.containers.BaseContainer.authorizeRemoteMethod(BaseContainer.java:908)
at com.sun.ejb.containers.StatelessSessionContainer.createEJBObjectImpl(StatelessSessionContainer.java:274)
at com.sun.ejb.containers.EJBHomeImpl.createEJBObjectImpl(EJBHomeImpl.java:89)
at com.sun.ejb.containers.EJBHomeInvocationHandler.invoke(EJBHomeInvocationHandler.java:140)
at $Proxy15.create(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1683)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1543)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:925)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:697)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:454)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1188)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:398)
Caused by: java.rmi.AccessException: Client is not authorized for this invocation.
at com.sun.ejb.containers.BaseContainer.authorizeRemoteMethod(BaseContainer.java:906)
... 19 more
----------END server-side stack trace---------- vmcid: 0x2000 minor code: 1806 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:195)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at com.dcit.bmj.bmo.interfaces._HelloWorldHome_DynamicStub.create(_HelloWorldHome_DynamicStub.java)
at com.dcit.bmj.client.WasUpClient.main(WasUpClient.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:237)
at com.sun.enterprise.appclient.Main.<init>(Main.java:423)
at com.sun.enterprise.appclient.Main.main(Main.java:96)
Caused by: org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x2000 minor code: 1806 completed: Maybe
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:179)
at com.sun.ejb.containers.BaseContainer.authorizeRemoteMethod(BaseContainer.java:908)
at com.sun.ejb.containers.StatelessSessionContainer.createEJBObjectImpl(StatelessSessionContainer.java:274)
at com.sun.ejb.containers.EJBHomeImpl.createEJBObjectImpl(EJBHomeImpl.java:89)
at com.sun.ejb.containers.EJBHomeInvocationHandler.invoke(EJBHomeInvocationHandler.java:140)
at $Proxy15.create(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1683)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1543)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:925)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:697)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:454)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1188)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:398)
Caused by: java.rmi.AccessException: Client is not authorized for this invocation.
at com.sun.ejb.containers.BaseContainer.authorizeRemoteMethod(BaseContainer.java:906)
... 19 more
----------END server-side stack trace---------- vmcid: 0x2000 minor code: 1806 completed: Maybe
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:274)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:902)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:575)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:132)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129)
... 10 moreHi Raja.
So Sorry for the delay. Anyway, I've come back to try to do this now and just cant make the problem happen! I'm tearing my hair out to figure out what has changed. In the meantime, I'm going to just move past this. If it shows up again, I'll be sure to post all related files back in this forum.
Thanks! -
Java.rmi.AccessException: CORBA NO_PERMISSION 0 No
i m new to j2ee...deployed "AdviceApp" application successfully given in Head First EJB book to sun RI server...when i run the client which is a simple java application on the same m/c as RI server, i get following error
D:\technical\java\projects\advice>java -cp c:\j2sdkee1.3\lib\j2ee.jar;AdviceAppC
lient.jar;d:\technical\java\projects\advice\ AdviceClient
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
eption(ReplyMessage_1_2.java:93)
at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(
ClientResponseImpl.java:108)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOACli
entSC.java:136)
at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at headfirst._AdviceHome_Stub.create(Unknown Source)
at AdviceClient.go(AdviceClient.java:23)
at AdviceClient.main(AdviceClient.java:11)ne leads will be appreciated.
thnks in advanceNever mind...found the solution
http://java.sun.com/j2ee/sdk_1.3/faq.html#access
had to redeploy the application after security changes. -
Java.rmi.AccessException: CORBA NO_PERMISSION 9998
Hi, Friends,
I am using SUN RI and getting:
java.rmi.AccessException: CORBA NO_PERMISSION 9998
The bean was successfully deployed and the look up for the reference
was successful too and returned an instance:
Object objref = ctx.lookup("ejb/TestConnection");
home =(TestConnectionHome)PortableRemoteObject.narrow(objref,
TestConnectionHome.class);
But when I try to create a bean:
bean = home.create();
I am getting an exception:
Can't create new bean for TestConnection .
java.rmi.AccessException: CORBA NO_PERMISSION 9998 Maybe; nested
exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 9998 completed:
Maybe
java.rmi.AccessException: CORBA NO_PERMISSION 9998 Maybe; nested
exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 9998 completed:
Maybe
org.omg.CORBA.NO_PERMISSION: minor code: 9998 completed: Maybe
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
eption(ReplyMessage_1_2.java:93)
at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(
ClientResponseImpl.java:108)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOACli
entSC.java:136)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:297)
at com.sap.mw.jco.jra.test._TestConnectionHome_Stub.create(Unknown
Sourc
e)
Does somebody know what is the cause of it?
(All the bean methods like create() are public, so it should not be
the problem.)
I very appreciate any tips,
Regards,
Eugen
PS: I already set Security on "Support Client Choice".I got it finally.
In the Security, I needed to add to the Role Name "Guest" the User Name "guest" -
Exception:java.rmi.AccessException: CORBA NO_PERMISSION 0 No
I was trying to run the Cart example with the J2EE but got the above exception. I was successful with the Converter example but not work with this one.
Please help
TomHere is the exact message:
D:\OnlineBooks\j2eetutorial\examples\ears>runclient -client CartApp.ear -name Ca
rtClient -textauth
Initiating login ...
Enter Username:guest
Enter Password:guest123
Binding name:`java:comp/env/ejb/SimpleCart`
Caught an unexpected exception!
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
eption(ReplyMessage_1_2.java:93)
at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(
ClientResponseImpl.java:108)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOACli
entSC.java:132)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:459)
at CartHomeStub.create(Unknown Source)
at CartClient.main(CartClient.java:26)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:22
9)
at com.sun.enterprise.appclient.Main.main(Main.java:155) -
I am using RMI, and every time that I run my server application, I have this Exception
java.rmi.ServerException: Server RemoteException; nested exception is:
java.rmi.AccessException: Registry.rebind 673.89.65.000/673.89.65.000 !=localhost/127.0.0.1
I am using Solaris, can anybody tell me what to do with this exceptionYour security manager (probably an RMISecurityManager) is not letting your rebind. What does your policy file say?
-
Java.rmi.AccessExeption: CORBA NO_PERMISSION
When I try to connect to my ejb using iiop I have an exception: java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:93)........
Please help!is you client application a swing app
-
Simple question about java.rmi.registry.Registry
Hi,
where the object java.rmi.registry.Registry takes a URL to rmiregistry when perform bind method.
thanks.Ok, will try to explain.
I have a server that I register in the RMI registry. Client from a remote machine get the server (as a remote object) and calls his method for the generation of another object on the parameters passed. The server creates this object and tries to register it in the RMI registry, and this raises an exception Registry.Registry.rebind disallowed; origin /11.0.10.31 is non-local host.
11.0.10.31 is a IP - address of the client -
Hello everyone.
I have a problem.
I have a server that I register in the RMI registry. Client from a remote machine get the server (as a remote object) and calls his method for the generation of another object on the parameters passed. The server creates this object and tries to register it in the RMI registry, and this raises an exception Registry.Registry.rebind disallowed; origin /11.0.10.31 is non-local host.
What could be the problem and how to solve it?
Thanks.Ah, this is the problem. It's a bit difficult to explain but if you create an in-JVM Registry and then call rebind() on the result while executing a remote method on behalf of a client, your are doing a local method invocation on the Registry instance so the client host appears to be the calling client rather than yourself. Change the rebind() call to use Naming.rebind() and the problem will go away.
-
[Java 1.4.2] Rmi over SSL : bind/rebind hangs
Hello everybody,
I am trying to test client/server communication with RMI over an SSL layer, as explained here .
Here is my server class :
package rmitest.server;
import java.rmi.registry.*;
import java.rmi.*;
import rmitest.client.RMISSLClientSocketFactory;
import java.rmi.server.RMIClientSocketFactory;
import java.rmi.server.RMIServerSocketFactory;
import java.rmi.registry.LocateRegistry;
import java.rmi.server.*;
import java.io.IOException;
public class Hello extends UnicastRemoteObject implements HelloInterface
public Hello(RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException
//super();
super(1099, csf, ssf);
System.out.println("Initialisation de Hello OK.");
public int sayHello()
try {
System.out.println("Hello, World !");
return 0;
catch (Exception e)
e.printStackTrace();
return 1;
public static void main(String[] args)
try
System.setSecurityManager(new RMISecurityManager());
RMIClientSocketFactory csf = new RMISSLClientSocketFactory();
RMIServerSocketFactory ssf = new RMISSLServerSocketFactory();
HelloInterface myHello = new Hello(csf, ssf);
Registry reg = LocateRegistry.getRegistry("lat203", 1099, csf);
reg.rebind("HelloInterface", myHello);
System.out.println("The server is ready.");
catch (RemoteException e)
e.printStackTrace();
catch (Exception e)
e.printStackTrace();
}My problem is, the program hangs in the rebind(...) instruction. Would anybody have a clue ?
Here is the stack just before it hangs :
{codeThread [main] (Stepping)
UnicastRef2(UnicastRef).newCall(RemoteObject, Operation[], int, long) line: 313
RegistryImpl_Stub.rebind(String, Remote) line: not available
Hello.main(String[]) line: 56
Thread [Thread-1] (Running) }Thank you by advance.
Edited by: le_barde on Oct 17, 2008 6:45 AMOk I settled that in the client socket factory. Here is what it looks like :
package com.infotel.rmitest.client;
import java.io.*;
import java.net.*;
import java.rmi.server.*;
import javax.net.ssl.*;
import sun.security.util.Debug;
public class RMISSLClientSocketFactory
implements RMIClientSocketFactory, Serializable {
public Socket createSocket(String host, int port)
throws IOException
SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket = (SSLSocket)factory.createSocket(host, port);
String[] strtab = {"TLSv1", "SSLv3"};
socket.setEnabledProtocols(strtab);
System.out.println("---> before handshake");
socket.startHandshake();
System.out.println("---> after handshake.");
return socket;
public int hashCode()
return getClass().hashCode();
public boolean equals(Object obj)
if (obj == this)
return true;
else if (obj == null || getClass() != obj.getClass())
return false;
return true;
}I haven't modified my Server socket factory.
The client still hangs but the messages are different as I have removed the SSLv2ClientHello :
>
(lots of trusted certificates...)
init context
trigger seeding of SecureRandom
done seeding SecureRandom
---> before handshake
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1225125230 bytes = { 150, 101, 222, 255, 92, 207, 52, 204, 48, 37, 184, 89, 56, 39, 207, 230, 8, 210, 1, 235, 137, 48, 202, 242, 203, 4, 61, 91 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
[write] MD5 and SHA1 hashes: len = 73
0000: 01 00 00 45 03 01 49 06 ED 6E 96 65 DE FF 5C CF ...E..I..n.e..\.
0010: 34 CC 30 25 B8 59 38 27 CF E6 08 D2 01 EB 89 30 4.0%.Y8'.......0
0020: CA F2 CB 04 3D 5B 00 00 1E 00 04 00 05 00 2F 00 ....=[......../.
0030: 33 00 32 00 0A 00 16 00 13 00 09 00 15 00 12 00 3.2.............
0040: 03 00 08 00 14 00 11 01 00 .........
main, WRITE: TLSv1 Handshake, length = 73
(Here the client hangs; this is the point when I kill the JVM)>
Now my server output (I don't give the verbose certificates):
>
trigger seeding of SecureRandom
done seeding SecureRandom
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
* SERVER INITIALIZED *
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
etc. -
Rebind Method and java.rmi.server.hostname
Hello,
We are trying to execute a server on the internet which is installed in a machine whose private IP address is 10.X.X.XX.
To access the server by internet, the IP address is 196.XXX.XXX.XX and is converted by NAT to the IP address 10.X.X.XX.
I start the server with the command:
java -Djava.rmi.server.hostname=196.XXX.XXX.XXX myServer
Also, and according some recommendation in this forum, we don't use the "rmiregistry" and instead we use the method:
Registry r = LocateRegistry.getRegistry(MYPORT);
r.rebind("MyServer", obj);
However,
And it takes about over 4 minutes for this app to execute the rebind method. Does anyone know why ?
If I start without java.rmi.server.hostname propert. it executes immediatelly, but then I can't access the server from outside firewall.
Am I missing something?
Any advice or idea?
Thanks
Gerardo
PS. I am using Java 1.4.1 under Linux Red Hat 9.0.I start the server with the command:
java -Djava.rmi.server.hostname=196.XXX.XXX.XXX myServerThe wait is probably due to your DNS setup. Is a client inside the firewall able to reverse-resolve a 196.xxx.xxx.xxx address?
EJP -
"Error while registering the Java 2 Runtime Environment registry keys"
"Error while registering the Java 2 Runtime Environment registry keys"
I am getting the above error when trying to install the 1.3 JRE (installed with the 1.3 plug in which I need). As part of my development I have been installing and uninstalling the JRE multiple times. Then, I got the above error when trying to install it, and now it appears to be installed but I cannot uninstall it. When I try to uninstall it, it just remains, and when I try to install it again I get the above error. I have tried cleaning up all javasoft registry entries, but it doesnt seem to have helped. Can anyone help me either completely uninstall the JRE so I can do a clean install or help me get rid of the error above when I install. Is there some registry entries I should be looking at? Anything else? this is quite urgent as I need to test my applet with the plugin installed and not installed - and I currently cant uninstall it. Any ideas?
Thanks for your help
AaronI am getting this same error message when trying to upgrade from 1.3.1_03 to 1.3.1_19.
I have multiple versions of jre's and jdks on my machine.
Anyone else seen this problem or know how to resolve it. -
Hi there
Running Oracle Enterpride Edition 8.1.7
including Oracle Http webserver
I'm trying to run a JSP application developed with Jdeveloper
through th http server
Think I have modified alle the .conf files correctly
I get the message :
"Error Message: java.lang.RuntimeException: JSP Registry could not locate runtime property file:ORDERS_ORDERS_PKG_ORDERS_PKGModule.properties"
Any ideas ?
Or can anyone point me to a (proper) document that decribes (correctly and completely) alle the steps that need to be done ?
Many Thanxs
Regards TJ
nullI am also experiancing this problem. I have updated the ojsp to version 112200 and the properties file exist within the .jar used by the .jsp file.
Exception:
java.lang.RuntimeException: java.lang.RuntimeException: JSP Registry could not locate runtime property file:deseweb_DesewebModule.properties
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.lang.RuntimeException.(RuntimeException.java:47)
at morenet.jsp.JSPApplicationRegistry.registerApplicationFromProperties(JSPApplicationRegistry.java:199)
at morenet.jsp.MorenetWebBeanImpl.internalInitialize(MorenetWebBeanImpl.java:119)
at oracle.jdeveloper.html.WebBeanImpl.initialize(WebBeanImpl.java:56)
at oracle.jdeveloper.html.DataWebBeanImpl.initialize(DataWebBeanImpl.java:395)
at morenet.jsp.MorenetWebBeanImpl.initialize(MorenetWebBeanImpl.java:62)
at apps.deseweb._index._jspService(_index.java:71)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
at oracle.jsp.JspServlet.internalService(Compiled Code)
at oracle.jsp.JspServlet.service(JspServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at org.apache.jserv.JServConnection.run(Compiled Code)
at java.lang.Thread.run(Compiled Code) -
I am having problems with the following code that I am currently trying to understand RMI from Java head First, the following are meant to be part of an universal browser that the browser downloads and displays interactive Java GUIs. Can someone explain what I am doing wrong as I am still new to Java please?
import java.awt.*;
import javax.swing.*;
import java.rmi.*;
import java.awt.event.*;
public class ServiceBrowser {
JPanel mainPanel;
JComboBox serviceList;
ServiceServer server;
public void buildGUI() {
JFrame frame = new JFrame("RMI Browser");
mainPanel = new JPanel();
frame.getContentPane().add(BorderLayout.CENTER, mainPanel);
Object[] services = getServicesList();
serviceList = new JComboBox(services);
frame.getContentPane().add(BorderLayout.NORTH, serviceList);
serviceList.addActionListener(new MyListListener());
frame.setSize(500,500);
frame.setVisible(true);
void loadService(Object serviceSelection) {
try {
Service svc = server.getService(serviceSelection);
mainPanel.removeAll();
mainPanel.add(svc.getGuiPanel());
mainPanel.validate();
mainPanel.repaint();
} catch(Exception ex) {
ex.printStackTrace();
Object[] getServicesList() {
Object obj = null;
Object[] services = null;
try {
obj = Naming.lookup("rmi://127.0.0.1/ServiceServer");
catch(Exception ex) {
ex.printStackTrace();
server = (ServiceServer) obj;
try {
services = server.getServiceList();
} catch(Exception ex) {
ex.printStackTrace();
return services;
class MyListListener implements ActionListener {
public void actionPerformed(ActionEvent ev) {
// do things to get the selected service
Object selection = serviceList.getSelectedItem();
loadService(selection);
public static void main(String[] args) {
new ServiceBrowser().buildGUI();
}I am able to compile the code but come up with the following error messages at runtime
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at ServiceBrowser.getServicesList(ServiceBrowser.java:53)
at ServiceBrowser.buildGUI(ServiceBrowser.java:19)
at ServiceBrowser.main(ServiceBrowser.java:82)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 8 more
java.lang.NullPointerException
at ServiceBrowser.getServicesList(ServiceBrowser.java:64)
at ServiceBrowser.buildGUI(ServiceBrowser.java:19)
at ServiceBrowser.main(ServiceBrowser.java:82)
Exception in thread "main" java.lang.NullPointerException
at javax.swing.DefaultComboBoxModel.<init>(DefaultComboBoxModel.java:53)
at javax.swing.JComboBox.<init>(JComboBox.java:175)
at ServiceBrowser.buildGUI(ServiceBrowser.java:21)
at ServiceBrowser.main(ServiceBrowser.java:82)
The code for the remote implementation compile and runs, but the other code for services compiles but come back with the following error message at runtime:
Exception in thread "main" java.lang.NoSuchMethodError: main
I have included one of the services code below this happens with:
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
public class DiceService implements Service {
JLabel label;
JComboBox numOfDice;
public JPanel getGuiPanel() {
JPanel panel = new JPanel();
JButton button = new JButton("Roll 'em!");
String[] choices = {"1", "2", "3", "4", "5"};
numOfDice = new JComboBox(choices);
label = new JLabel("dice values here");
button.addActionListener(new RollEmListener());
panel.add(numOfDice);
panel.add(button);
panel.add(label);
return panel;
public class RollEmListener implements ActionListener {
public void actionPerformed(ActionEvent ev) {
// roll the dice
String diceOutput = "";
String selection = (String) numOfDice.getSelectedItem();
int numOfDiceToRoll = Integer.parseInt(selection);
for (int i = 0; i < numOfDiceToRoll; i++) {
int r = (int) ((Math.random() * 6) + 1);
diceOutput += (" " + r);
label.setText(diceOutput);
}how I do get suitable server running, can I not test the code on a local ip address first, i have included the remote implementation code below, can you advise how I can resolve this please or point me in the right direction?
import java.rmi.*;
import java.util.*;
import java.rmi.server.*;
public class ServiceServerImpl extends UnicastRemoteObject implements ServiceServer {
HashMap<String, Service> serviceList;
public ServiceServerImpl() throws RemoteException {
// start and set up services
setUpServices();
private void setUpServices() {
serviceList = new HashMap<String, Service>();
serviceList.put("Dice Rolling Service", new DiceService());
serviceList.put("Day of the Week Service", new DayOfTheWeekService());
serviceList.put("Visual Music Service", new MiniMusicService());
public Object[] getServiceList() {
System.out.println("in remote");
return serviceList.keySet().toArray();
public Service getService(Object serviceKey) throws RemoteException {
Service theService = (Service) serviceList.get(serviceKey);
return theService;
public static void main (String[] args) {
try {
Naming.rebind("ServiceServer", new ServiceServerImpl());
} catch(Exception ex) { }
System.out.println("Remote service is running");
}
Maybe you are looking for
-
Virtualbox(PUEL) 3.1.6 Host-Only Adaptor connectivity problems
Hi there! I'm a new Arch Linux user and i'm LOVING it ... I've hit one problem I can't seem to get Host-Only Adaptor networking working with VirtualBox (PUEL) with any virtual machines e.g. VM's can't communicate to anything Host machine, router etc,
-
How to create multiple layout in single reprot
How can we make different layout on the base of single report. Let suppose, we will pass parameter which call layout1, layout2 or 3. Any idea.
-
Diff. Tcodes for Vendor Master Data
Hi, We create the Vendor Master through XK01 Tcode...In which 3 window comes...General Data, Company Code Data and Purchasing data... In General Data, 4 checkbox are there....Address, Control, Payment Transactions and Contact Persons... Now requireme
-
How do you replace the hdd in an emac
how do you replace the hdd in an emac
-
QuickTime doesn't allow to choose each audio track of one language
1) Before you tell me that I'm asking question in wrong community section, I can't enter to QuickTime section with new Safari 8.0 and it says that I have to download Safari. 2) I have some videos in .mp4 format and it contains few English audio track