BEA-080003 RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnectionImpl
When i try to run oracle webcenter portal in jdeveloper by Run button i see in console
[12:23:43 PM] Deploying Application...
<18.07.2013 12:23:43 MSK> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnectionImpl.invoke(Ljavax.management.ObjectName;Ljava.lang.String;Ljava.rmi.MarshalledObject;[Ljava.lang.String;Ljavax.security.auth.Subject;)
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: query.
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: query
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.wlsRun(SecurityHelper.java:819)
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.run(SecurityHelper.java:682)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.management.internal.SecurityHelper.isAccessAllowed(SecurityHelper.java:269)
Truncated. see log file for complete stacktrace
>
<18.07.2013 12:23:43 MSK> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnectionImpl.invoke(Ljavax.management.ObjectName;Ljava.lang.String;Ljava.rmi.MarshalledObject;[Ljava.lang.String;Ljavax.security.auth.Subject;)
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: deploy.
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: deploy
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.wlsRun(SecurityHelper.java:819)
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.run(SecurityHelper.java:682)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.management.internal.SecurityHelper.isAccessAllowed(SecurityHelper.java:269)
Truncated. see log file for complete stacktrace
>
<18.07.2013 12:23:43 MSK> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnectionImpl.invoke(Ljavax.management.ObjectName;Ljava.lang.String;Ljava.rmi.MarshalledObject;[Ljava.lang.String;Ljavax.security.auth.Subject;)
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: query.
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: query
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.wlsRun(SecurityHelper.java:819)
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.run(SecurityHelper.java:682)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.management.internal.SecurityHelper.isAccessAllowed(SecurityHelper.java:269)
Truncated. see log file for complete stacktrace
>
<18.07.2013 12:23:44 MSK> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnectionImpl.invoke(Ljavax.management.ObjectName;Ljava.lang.String;Ljava.rmi.MarshalledObject;[Ljava.lang.String;Ljavax.security.auth.Subject;)
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: query.
weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[weblogic], on ResourceType: DeployerRuntime Action: execute, Target: query
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.wlsRun(SecurityHelper.java:819)
at weblogic.management.internal.SecurityHelper$IsAccessAllowedPrivilegeAction.run(SecurityHelper.java:682)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.management.internal.SecurityHelper.isAccessAllowed(SecurityHelper.java:269)
Truncated. see log file for complete stacktrace
>
[12:23:45 PM] #### Deployment incomplete. ####
[12:23:45 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
what does it mean and how to solve this?
any help?
Similar Messages
-
BEA-080003 RuntimeException thrown by rmi server:
Hi,
We have one Admin server and 2 managed servers and we are getting the following error when ever is request is received on the server side . Can any one please prvide a soultion how to over come this problem
<Feb 12, 2009 1:05:57 PM GMT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.cluster.replication.ReplicationManager.create(Lweblogic.rmi.spi.HostID;ILweblogic.cluster.replication.ROID;Lweblogic.cluster.replication.Replicatable;)
java.lang.NullPointerException.
java.lang.NullPointerException
at weblogic.cluster.replication.WrappedRO.addRO(WrappedRO.java:49)
at weblogic.cluster.replication.ReplicationManager$wroManager.create(ReplicationManager.java:288)
at weblogic.cluster.replication.ReplicationManager.create(ReplicationManager.java:785)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
Truncated. see log file for complete stacktrace
>
<Feb 12, 2009 1:05:57 PM GMT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.cluster.replication.ReplicationManager.create(Lweblogic.rmi.spi.HostID;ILweblogic.cluster.replication.ROID;Lweblogic.cluster.replication.Replicatable;)
java.lang.NullPointerException.
java.lang.NullPointerException
at weblogic.cluster.replication.WrappedRO.addRO(WrappedRO.java:49)
at weblogic.cluster.replication.ReplicationManager$wroManager.create(ReplicationManager.java:288)
at weblogic.cluster.replication.ReplicationManager.create(ReplicationManager.java:785)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
Truncated. see log file for complete stacktrace
>
<Feb 12, 2009 1:05:57 PM GMT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.cluster.replication.ReplicationManager.create(Lweblogic.rmi.spi.HostID;ILweblogic.cluster.replication.ROID;Lweblogic.cluster.replication.Replicatable;)
java.lang.NullPointerException.
java.lang.NullPointerException
at weblogic.cluster.replication.WrappedRO.addRO(WrappedRO.java:49)
at weblogic.cluster.replication.ReplicationManager$wroManager.create(ReplicationManager.java:288)
at weblogic.cluster.replication.ReplicationManager.create(ReplicationManager.java:785)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
Truncated. see log file for complete stacktrace
>
<Feb 12, 2009 1:05:57 PM GMT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.cluster.replication.ReplicationManager.create(Lweblogic.rmi.spi.HostID;ILweblogic.cluster.replication.ROID;Lweblogic.cluster.replication.Replicatable;)
java.lang.NullPointerException.
java.lang.NullPointerException
at weblogic.cluster.replication.WrappedRO.addRO(WrappedRO.java:49)
at weblogic.cluster.replication.ReplicationManager$wroManager.create(ReplicationManager.java:288)
at weblogic.cluster.replication.ReplicationManager.create(ReplicationManager.java:785)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
Truncated. see log file for complete stacktraceUnless you are in post 9.2mp1 version this is a known issue and fixed. Contact support about BUG8132425
-
Sql server configuration manager remote procedure call failed(0x800706be)
Hi,
My Sql Server Management Studio working well. But When I open Sql server configuration manager I Got an error
“Remote procedure call failed (0x800706be)”
I tried Goggling the problem and solve it but I am not getting any valuable
solution. Is anyone solve this problem
I attach snap here
MySql Server Details:
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (X64) Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )This error appears to happen when .mof files (Managed Object Format (MOF)) don’t get installed and registered correctly during set-up. To resolve this issue, I executed
the following mofcomp command in command prompt to re-register the *.mof files:
mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"
Regards,
Basit A. Farooq (MSC Computing, MCITP SQL Server 2005 & 2008, MCDBA SQL Server 2000)
http://basitaalishan.com
cau u pls tell me how to type this command on command prompt. I also have the same error in sql server 2008. I allready have sql server 2008 sp2 installed. When I was trying to type this command as it it by copying this full command to command prompt it
shows that command not found as follows
C:\>mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmpr
oviderxpsp2up.mof"
Microsoft (R) MOF Compiler Version 6.1.7600.16385
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
File 'C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2
up.mof' not found!
please tell me step by step
thanks
nravhad -
Runtime exception by rmi server
Hi all,I need a help regarding this issue.iam having the following error on the logs.The only way to fix thi issue was restarting the managed server and it got resolved.Is there any resaon for the cause of this issue,as the code is moving to production i want to make sure to identify what could be the reason to get this error.Any help is greatly appreciated.
<<WLS Kernel>> <> <> <1300456918029> <BEA-080003> <RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lang.String;Ljavax.security.auth.Subject;)
javax.management.RuntimeMBeanException: javax.management.RuntimeMBeanException: MBean getAttribute failed: java.lang.NullPointerException.
javax.management.RuntimeMBeanException: javax.management.RuntimeMBeanException:MBean getAttribute failed: java.lang.NullPointerException
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:856)I am suffering the same problem, any fix for this problem??
-
Hi,
I have a WebLogic 11gR1 installation (on Windows Server 2012 with Oracle backend) and is trying to create credential using Credential Store Framework following steps described inhttp://www.redheap.com/2013/06/secure-credentials-in-adf-application.html
I tried to do it with WLST (from under Oracle\Middleware\oracle_common\common\bin) and get the following error:
wls:/WcsDomain/serverConfig> createCred(map="ClayTablet.Sample",key="TestKey",user="TestUser",password="blah",desc="Test Key");
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)
COMMAND FAILED due to an unknown reason, Check the stack trace for details
Traceback (innermost last):
File "<console>", line 1, in ?
File "C:\Oracle\MIDDLE~1\ORACLE~1\common\wlst\jpsWlstCmd.py", line 522, in createCred
File "C:\Oracle\MIDDLE~1\ORACLE~1\common\wlst\jpsWlstCmd.py", line 504, in createCredImpl
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.invoke(Unknown Source)
at weblogic.management.remote.common.RMIConnectionWrapper$16.run(ClientProviderBase.java:918)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java: 146)
at weblogic.security.Security.runAs(Security.java:61)
at weblogic.management.remote.common.RMIConnectionWrapper.invoke(ClientProviderBase.java:916)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993)
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:597)
javax.management.InstanceNotFoundException: javax.management.InstanceNotFoundException: com.oracle.jps:type=JpsCredentialStore
Thanks,
Yu
P.S. I was using WLST command under Oracle\Middleware\wlserver_10.3\common\bin to do the same and got a different error NameError: createCred and posted a question about that under How to create credential in Credential Store Framework?
After searching for the same error message in the community I tried to switch to WLST under Oracle\Middleware\oracle_common\common\bin and got the error posted here.After extending my domain with JRF and JRF WebService Asynchronous services, I was able to execute "createCred" and "listCred" and so on.
Yu -
Can I put both RMI server and client in a same program
hi everybody...
I wanna know that can I use RMI server and client in a same program....My idea is like that I wanna use the same program for client and server....When I open my program, I can accept connection from other program and if I want to connect to others, I can also connect it. I expect you to understand my question. Here are the sample code for my program...
package Chat.Rmi;
import java.lang.*;
import java.util.*;
import java.rmi.*;
import javax.swing.*;
import java.net.*;
import java.rmi.server.*;
import java.rmi.registry.*;
public class netKitManager implements netKitInterface{
public netKitManager(){
try{
reg = LocateRegistry.createRegistry(4242);
reg.rebind("NetKitServer",this);
}catch(RemoteException re){
public void DirectConnect(String ip){
try{
netUser = (netKitInterface) Naming.lookup("rmi://"+ip+":4242/NetKitServer");
JOptionPane.showMessageDialog(null,"Connection succeded!");
}catch(NotBoundException nbe){
JOptionPane.showMessageDialog(null,"There is no server at specified IP address!");
}catch(MalformedURLException mue){
JOptionPane.showMessageDialog(null,"IP adress may be wrong!");
}catch(RemoteException re){
JOptionPane.showMessageDialog(null,"Remote exception occured!");
public void SendMessage(String msg){
try{
netUser.SetMessage(msg);
}catch(RemoteException re){
public void SetMessage(String msg) throws RemoteException{
chatKit.SetMessage(msg);
private netKitInterface netUser;
private Hashtable netUserList;
private Registry reg;
}Yes it can be done. I have done it.
-
Codebase run RMI server .NoClassDefFoundError:
If I run the folllowing from the solaris command line
java -cp /junk/jdev+/jdev/src -Djava.rmi.server.logCalls=true -Djava.rmi.server.codebase=file:////junk/jdev+/jdev/src/ -Djava.security.policy=/junk/jdev+/jdev/src/jdev/server/policy jdev.server.RMIServerDBAdapter
my RMIServerDBAdapter binds regardless of my current working directory. In other words the RMI server
runs and binds as expected.
If I remove the classpath clause of the java command (-cp /junk/jdev+/jdev/src) then the RMI server
will only run and bind if my current working directory is the "root" of the package.
In this case if my current working directory is /junk/jdev+/jdev/src the RMI server will run and bind as
it should. If my current working directory is at the root of the solaris file system ( / ) I get the following error
Exception in thread "main" java.lang.NoClassDefFoundError: jdev/server/RMIServerDBAdapter
My question is why doesn't the code base clause of the java command point to the root
directory of the package /junk/jdev+/jdev/src. It seems to me that the codebase clause
would point to the root directory of the package allowing the RMI server to run and bind as expected
regardless of the current working directory.
I cannot get this to work. I have tried 0-4 slashes (file:/, - file:////) that did not seem to help.
The package statement in the java source files is
package jdev.server
Thank you in advance for your help.
Michael
[email protected]Hi Ciaccio,
Your question is doesn't clear enogh to me to answer it straight... But I'll try... :)
First you must not mix the reason and usage of the codebase and classpath. Classpath is locally parsed and used, codebase is remotely parsed and used (at the registry and at the client side).
Your server program cannot start if you don't tell to the system where to find the needed classes. That's why you have to specify the root path of the jdev.server.RMIServerDBAdapter in the CLASSPATH (from that point will search the java system the jdev dir, the server dir and the RMIServerDBAdapter object) .
If the Java system is unable to locate any of a needed class it throws a nice exception during the startup of the server program.
The codebase property is used by the client and the registry to locate the stub objects (and return types and parameter types) if those cannot be found on their local classpath. This path (or it would be more accurate to call what it is: URL) must be an absolute address (path, URI, etc), because the clients and the registry can be started anywhere. This way you also have to set RMISecurityManager and polici files also to your client because of dynamic class downloading...
Last thing:
Note the line above: ...if those cannot be found on their local classpath... If the stubs and the param/return types are present in the registry's and the clients local classpath then you don't have to specify codebase property at the server side because it is not parsed at all.
I hope I could help,
Sanyi -
How to Convert an RMI Server into WINNT service
I have an RMI Server, that looks like the following
SimpleRMIServer.java
import java.io.*;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class SimpleRMIServer
public static void main(String[] argv) {
System.setSecurityManager(new RMISecurityManager());
try {
LocateRegistry.createRegistry(1099);
SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
// SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
System.out.println("SimpleRMIImpl ready");
catch (Exception e) {
System.out.println("Exception occurred: " + e);
the SimpleRMIImpl.java also is available. (SimpleRMIImpl.class)
now the problem is how to convert this Server to a service.
I have seen a java class that extends a service class have been converted to a service like the following
TestService.java
// TestService.java
// (C) Copyright 1995 - 1999 Microsoft Corporation. All rights reserved.
import java.io.*;
import com.ms.service.*;
public
class TestService extends Service
static
// Uncomment to disable the assassin. The service will fail to respond
// in the time specified in the last waithint for the third pause
// event received. If the assassin is enabled (i.e. this line is commented
// out, the default), then the service will be forcibly killed.
//Service.disableassassin = true;
int pausecount;
int intcount;
public TestService (String[] args) throws IOException
System.out.println("Sending updated pending status");
CheckPoint(1000);
System.out.println("Sending running status with all controls");
setRunning(ACCEPT_SHUTDOWN | ACCEPT_PAUSE_CONTINUE | ACCEPT_STOP);
System.out.println("Started");
protected
boolean handleStop ()
setStopping(5000);
System.out.println("dying");
return true;
protected
boolean handlePause ()
pausecount++;
if (pausecount == 3)
System.out.println("pause #3, sleeping for 30 seconds, should be killed in 2+5 seconds");
setPausing(2000);
try
Thread.sleep(30000);
catch (InterruptedException e)
System.out.println("interrupted");
else
System.out.println("received pause #"+pausecount+", pausing for 2 seconds");
setPausing(5000);
try
Thread.sleep(2000);
catch (InterruptedException e)
System.out.println("interrupted");
System.out.println("sending paused");
setPaused();
System.out.println("sent paused");
return false;
protected
boolean handleContinue ()
System.out.println("received continue, continuing after 2 seconds");
setContinuing(5000);
try
Thread.sleep(2000);
catch (InterruptedException e)
System.out.println("interrupted");
System.out.println("sending running");
setRunning();
System.out.println("sent running after continue");
return false;
protected
boolean handleShutdown ()
System.out.println("received shutdown, treating as stop");
return handleStop();
protected
boolean handleInterrogate ()
System.out.println("received interrogate");
setServiceStatus(getServiceStatus());
System.out.println("sent status for interrogate");
intcount++;
if (intcount == 3)
System.out.println("received 3rd interrogate, stopping self in 5 seconds");
try
Thread.sleep(5000);
catch (InterruptedException iex)
System.out.println("interrupted");
System.out.println("stopping");
StopServiceEventHandler(1000);
return false;
using the jntsvc.exe tool, that code have been converted to an executable, then installed as a service.
I've tried to embed the RMIServer code in the constructor for this service, but it didn't work
Hope you have a clear understanding of what I'm saying
any help, highly appreciated
thanx in advance
here is my email [email protected]
regardsOur second installment of "Questions from the Past"
Dear viewer, check out Tomcat's source, I believe they implement Tomcat as a service so just follow what they did.
Steve - your answer Guru
Tune in next week for our third installment of "Questions from the past" -
Problem in starting RMI server, please help!
Hi , all:
I am learning RMI from SUN's tutorial. I set all of program packages as same as the tutorial, compiled all of programs . and built all of the jar files, the server classes and the client classes.When I run the server, ComputeEngine, it did not work ,and the following messages were showed at command lines:
C:\RMI\doc>java -Djava.rmi.server.codebase=file:/c:\rmi\ann\public_html\classes/
-Djava.rmi.server.hostname=localhost -Djava.security.policy=java.policy eng
ine.ComputeEngine
ComputeEngine exception: access denied (java.net.SocketPermission 127.0.0.1:1099
connect,resolve)
java.security.AccessControlException: access denied (java.net.SocketPermission 1
27.0.0.1:1099 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
at java.net.Socket.<init>(Socket.java:262)
at java.net.Socket.<init>(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:25)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:120)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at engine.ComputeEngine.main(ComputeEngine.java:25)
Please give helps .
Thanks!Thank.
Thank.
I have put them at the same directory, but is deos not work.
Something I am not sure.
On the SUN's tutorial , the follows is given:
Win32:
java -Djava.rmi.server.codebase=file:/c:\home\ann\public_html\classes/
-Djava.rmi.server.hostname=zaphod.east.sun.com
-Djava.security.policy=java.policy
engine.ComputeEngine
I changed hostname = localhost
I also changed the code of the server class given by tutorial :
String name = "//host/Compute" ;
to:
String name = "//localhost/Compute";
Should I make such changes?
Here is the server class given by the tutorial:
package engine;
import java.rmi.*;
import java.rmi.server.*;
import compute.*;
public class ComputeEngine extends UnicastRemoteObject
implements Compute
public ComputeEngine() throws RemoteException {
super();
public Object executeTask(Task t) {
return t.execute();
public static void main(String[] args) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
String name = "//host/Compute";
try {
Compute engine = new ComputeEngine();
Naming.rebind(name, engine);
System.out.println("ComputeEngine bound");
} catch (Exception e) {
System.err.println("ComputeEngine exception: " +
e.getMessage());
e.printStackTrace(); -
Problem in starting RMI server, help please
Hi , all:
I am learning RMI from SUN's tutorial. I set all of program packages as same as the tutorial, compiled all of programs . and built all of the jar files, the server classes and the client classes.When I run the server, ComputeEngine, it did not work ,and the following messages are showed at command lines:
C:\RMI\doc>java -Djava.rmi.server.codebase=file:/c:\rmi\ann\public_html\classes/
-Djava.rmi.server.hostname=localhost -Djava.security.policy=java.policy eng
ine.ComputeEngine
ComputeEngine exception: access denied (java.net.SocketPermission 127.0.0.1:1099
connect,resolve)
java.security.AccessControlException: access denied (java.net.SocketPermission 1
27.0.0.1:1099 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
at java.net.Socket.<init>(Socket.java:262)
at java.net.Socket.<init>(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:25)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:120)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at engine.ComputeEngine.main(ComputeEngine.java:25)
Please give helps .
Thanks!You are setting the security policy to the file named
java.policy, make sure that it is in the same
directory where you are invoking the java compiler.Thank.
I have put them at the same directory, but is deos not work.
Something I am not sure.
On the SUN's tutorial , the follows is given:
Win32:
java -Djava.rmi.server.codebase=file:/c:\home\ann\public_html\classes/
-Djava.rmi.server.hostname=zaphod.east.sun.com
-Djava.security.policy=java.policy
engine.ComputeEngine
I changed hostname = localhost
I also changed the code of the server class given by tutorial :
String name = "//host/Compute" ;
to:
String name = "//localhost/Compute";
Should I make such changes?
Here is the server class given by the tutorial:
package engine;
import java.rmi.*;
import java.rmi.server.*;
import compute.*;
public class ComputeEngine extends UnicastRemoteObject
implements Compute
public ComputeEngine() throws RemoteException {
super();
public Object executeTask(Task t) {
return t.execute();
public static void main(String[] args) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
String name = "//host/Compute";
try {
Compute engine = new ComputeEngine();
Naming.rebind(name, engine);
System.out.println("ComputeEngine bound");
} catch (Exception e) {
System.err.println("ComputeEngine exception: " +
e.getMessage());
e.printStackTrace(); -
How to set the granted permission in RMI SERVER site
Hi everyone,
I have developin some simple RMi program but the error message is keep on prompting out and I cant really test out what is the result. I understand I got to GRANT the permission for the RMI but I I dun really know where should I start first. I know there are code that can be implement in the sErver site, just hope some one can guide me out.
Thank lot...
here is the code for server:
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class myRMIServer
public static void main(String[] argv)
System.setSecurityManager(new RMISecurityManager());
try
myRMIImpl implementation = new myRMIImpl("myRMIImplInstance");
catch (Exception e)
System.out.println("Exception occurred: " + e);
Where should i code the getProperties and setProperties code...so, what u mean is the problem occur doesnt related to coding part ?? do you think it is because I did not start the rmiRegistry, but somehow when i started the rmiRegistry, the console window is blank an it is nothing in the window. pls pls help me to solve this problem... sound easy initially but end up it is not...
by the way, here is the code
Interface
public interface myRMIInterface extends java.rmi.Remote
public java.util.Date getDate() throws java.rmi.RemoteException;
Interface Implementation
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class myRMIImpl extends UnicastRemoteObject implements myRMIInterface
public myRMIImpl(String name) throws RemoteException
super();
try
Naming.rebind(name, this);
catch(Exception e)
System.out.println("Exception occurred: " + e);
public java.util.Date getDate()
return new java.util.Date();
server
import java.rmi.*;
import java.rmi.Naming;
import java.rmi.RMISecurityManager;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.registry.LocateRegistry;
import java.util.Properties;
public class myRMIServer
public static void main(String[] argv)
//System.setProperty("java.security.policy","C:\\workspace\\MyRMI\\java.policy");
//System.getProperty("java.security.policy","C:\\workspace\\MyRMI\\java.policy");
//myRMIServer m = System.getProperties();
//m.setProperty("java.security.policy","C:\\workspace\\MyRMI\\java.policy");
//System.setSecurityManager(new RMISecurityManager());
//Properties p = System.getProperties();
//p.setProperty("java.security.policy","C:\\workspace\\MyRMI\\java.policy");
try
myRMIImpl implementation = new myRMIImpl("myRMIImplInstance");
Properties p = System.getProperties();
System.setProperty("java.security.policy","C:\\workspace\\MyRMI\\java.policy.txt");
System.setProperty("java.rmi.server.codebase","file:///P:\\Projects\\RMIServer\\bin");
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
System.out.println("Security manager registered");
//System.out.println("Service registered");
catch (Exception e)
System.out.println("Exception occurred: " + e);
here is the code, to run, I got a client one as well, but is just for displat purpose..
thank you, guys....really appreciate ur help -
[RMI] server/client, help me.
I have done a Chat with RMI, between a server and a client machine on my network.
The server start normaly, and the client manage to connect the server, but the server failed to connect the client.
Can Someone explain me why?
Here are the source files:
*********Client Distant****************
import java.rmi.*;
public interface ClientDistant extends java.rmi.Remote {
public void msg(Message m) throws RemoteException;
**********Client DistantImplementation**************
import java.io.*;
import java.net.*;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
import java.net.MalformedURLException;
public class ClientDistantImpl extends java.rmi.server.UnicastRemoteObject implements ClientDistant, Runnable {
String nom;
String nomServeur;
/** Constructs ClientDistantImpl object and exports it on default port.
public ClientDistantImpl(String nom, String nomServeur) throws RemoteException {
super();
this.nom = nom;
this.nomServeur= nomServeur;
Thread leThread = new Thread(this);
leThread.start();
/** Register ClientDistantImpl object with the RMI registry.
* @param name - name identifying the service in the RMI registry
* @param create - create local registry if necessary
* @throw RemoteException if cannot be exported or bound to RMI registry
* @throw MalformedURLException if name cannot be used to construct a valid URL
* @throw IllegalArgumentException if null passed as name
public static void registerToRegistry(String name, Remote obj, boolean create) throws RemoteException, MalformedURLException{
if (name == null) throw new IllegalArgumentException("le nom doit etre non vide");
try {
Naming.bind(name, obj);
} catch (AlreadyBoundException ex){
throw new IllegalArgumentException("le nom est deja utilise");
} catch (RemoteException ex){
if (create) {
Registry r = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
r.rebind(name, obj);
} else throw ex;
/** Main method.
public static void main(String[] args) {
System.setSecurityManager(new RMISecurityManager());
try {
BufferedReader entree = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Entrez votre nom");
String nom = entree.readLine();
System.out.println("Entrez le nom de la machine serveur");
String nomServeur = entree.readLine();
ClientDistantImpl obj = new ClientDistantImpl(nom, nomServeur);
String machineLocale = InetAddress.getLocalHost().getHostAddress();
System.out.println("Machine locale : "+machineLocale);
String[] tab = Naming.list("//"+nomServeur);
for(int i=0; i<tab.length; i++)
System.out.println(tab[i] + " est enregistre sur le registre du serveur");
ServeurChat sc = (ServeurChat) Naming.lookup("//"+nomServeur+"/serveurChat");
String url = "//"+machineLocale+"/"+nom;
sc.connect(url);
System.out.println("Entrez vos messages en terminant par FIN");
String mess = entree.readLine();
while(!mess.equalsIgnoreCase("FIN")) {
Message m = new Message(url, mess);
sc.msg(m);
mess = entree.readLine();
sc.disconnect(url);
System.exit(1);
} catch (Exception ex) {
ex.printStackTrace();
public void msg(Message m) throws RemoteException {
System.out.println(m);
public void run() {
try {
registerToRegistry(nom, this, true);
} catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
****************Serveur Chat********************
import java.rmi.*;
public interface ServeurChat extends ClientDistant {
public void connect(String url) throws RemoteException;
public void disconnect(String url) throws RemoteException;
*****************Serveur Chat Implementation**********
import java.net.*;
import java.util.*;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
import java.net.MalformedURLException;
/** Unicast remote object implementing ServeurChat interface.
* @author Patrice Torguet
* @version 1.0
public class ServeurChatImpl extends UnicastRemoteObject implements ServeurChat {
Vector clients;
/** Constructs ServeurChatImpl object and exports it on default port.
public ServeurChatImpl() throws RemoteException {
super();
clients = new Vector();
public static void registerToRegistry(String name, Remote obj, boolean create) throws RemoteException, MalformedURLException{
if (name == null) throw new IllegalArgumentException("registration name can not be null");
try {
Naming.rebind(name, obj);
} catch (RemoteException ex){
if (create) {
Registry r = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
r.rebind(name, obj);
} else throw ex;
/** Main method.
public static void main(String[] args) {
System.setSecurityManager(new RMISecurityManager());
try {
String machineLocale = InetAddress.getLocalHost().getHostName();
System.out.println("Nom du serveur = serveurChat");
ServeurChatImpl obj = new ServeurChatImpl();
registerToRegistry("serveurChat", obj, true);
} catch (Exception ex) {
ex.printStackTrace();
public void disconnect(String url) throws RemoteException {
clients.removeElement(url);
public void msg(Message m) throws RemoteException {
Enumeration e = clients.elements();
String url = null;
while(e.hasMoreElements()){
try {
url = (String) e.nextElement();
if (!url.equalsIgnoreCase(m.url)) {
ClientDistant cl = (ClientDistant) Naming.lookup(url);
cl.msg(m);
} catch(Exception ex) {
ex.printStackTrace();
clients.removeElement(url);
public void connect(String url) throws RemoteException {
clients.addElement(url);
*************Message*********************
import java.io.*;
* @author Patrice Torguet
* @version
public class Message implements Serializable {
String url;
String msg;
/** Creates new Message */
public Message(String url, String msg) {
this.url = url;
this.msg = msg;
public String toString() {
return url + " : " + msg;
Thx for help.This is the exception:
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
at java.net.Socket.<init>(Socket.java:268)
at java.net.Socket.<init>(Socket.java:95)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:20)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:115)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:494)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:169)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:78)
at ServeurChatImpl_Stub.connect(Unknown Source)
at ClientDistantImpl.main(ClientDistantImpl.java:85) -
My first RMI server: problem
Hi,
I'm just trying to create my first RMI program, but I got already blocked immediately:
It's just a stupid program with a function that returns "ok".
So what I did is the following:
1)I created a class OkServer.java
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface OkServer extends Remote {
public String getOk() throws RemoteException;
2)I created a class OkServerImpl.java
import java.rmi.server.UnicastRemoteObject;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;
import java.rmi.Naming;
public class OkServerImpl extends UnicastRemoteObject implements OkServer {
public OkServerImpl() throws RemoteException {
public String getOk() {
return "ok";
public static void main (String args[]) throws Exception {
System.setSecurityManager(new RMISecurityManager());
OkServerImpl OkSvr = new OkServerImpl();
Naming.bind("OkServer", OkSvr);
3) I compiled everything with javac *.java
i use java version below:
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)
4)I opened a cmd window and started the registry with the command c:\rmiregistr
(a cursor starts blinking, so I think it runs correctly)
5)then I start the program with the command: C:\java OkServerImpl
but I get the error below !!
C:\Temp\rmitester>java OkServerImpl
Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
at java.net.Socket.connect(Socket.java:513)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
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:569)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at java.rmi.Naming.bind(Naming.java:111)
at OkServerImpl.main(OkServerImpl.java:18)
What's wrong???solved, but i don't understand why i encountered this particular issue (that isn't mentioned to happen or to configure in my book):
i had to create a custom policy file:
make a file "c:\temp\rmitester\policy.all" and past the text below in it:
grant {
permission java.security.AllPermission "", "";
thereafter launch the server with this command:
c:\temp\rmitester\java -Djava.security.policy=policy.all OkServerImpl
and the client with this command:
c:\temp\rmitester\java -Djava.security.policy=policy.all OkClient localhost
Can anyone explain if it was normal that i encountered this problem or was it seldom behaviour that happens only to me? -
Help me prevent restarting my RMI server
I choose the RMI framework because I thought that this would support dynamic loading of classes. Now I'm beginning to doubt this feature, hope someone can fill in the blanks for me.
The clients are built using Java Web Start. I use RMI for authentication and transactions (application events, files, etc.). The interfaces I use in RMI are very loose, they take an Object as parameter and returns an Object. I wrote it that way because I didn't know what functionality I would need in the future.
Main problem: Compatibility issues when I rewrite classes on the client side....:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.InvalidClassException: jflex.rmi.RMIPostEvents; local class incompatible: stream classdesc serialVersionUID = 7574722854925780076, local class serialVersionUID = 8717205828862885031
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
yadayadayadayada.....
How can get the RMI server to reload the client classes when this exception occurs? If I have to restart the RMI server everytime I modify RMI classes on the client the RMI technique is useless to me.
Thanks in advance.OK, now I understand, and this is an interesting problem.
I would have expected RMI to have annotated all remotely loaded codebase namespaces with a session id, to prevent this type of thing from happening. Not good. Unfortunately this issue is in the 'deep-water' of RMI internal implementation. The only expert on this I know on this forum is ejp. If you're reading this Esmond, little help here, please!
It would seem that you are forced to also change the name of the implementation class of the JFlexServerTask implementation, or derive from it, a bit of a hassle for sure. Does the server hold persistent references to the loaded tasks? If not, the classes might be unloaded when the DGC runs, but again I am not sure of this. Also, you can never be sure when DGC will run. Otherwise it seems like over the long term, the server runtime could get pretty congested with unused classes.
I guess I have not run into this problem before since I generally I do not allow servers to accept code from clients. The reason being that if there is an error in the client implementation, it can easily crash the server, accidentally or intentionally. Authentication I generally handle by sending the client a random value, which it then hashes with its password. (SHA or MD5 are good) Your present scheme could be easily cracked, unless you are running RMI over SSL, since your authentication object would be sent in plaintext over the network.
However, I am guessing you want to send batch jobs to a server, on a highly trusted network. I'm not sure how to resolve the problem, this stumps me, and I have been doing this for a long time :-) -
i have set this property: -Djava.rmi.server.logCalls=true
now i am getting the following rmi log msgs on the console:
Tue Nov 12 15:38:08 PST 2002:RMI:RMI TCP Connection(4851)-172.16.103.94:[172.16.103.94: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
Tue Nov 12 15:38:13 PST 2002:RMI:RMI TCP Connection(4852)-127.0.0.1:[127.0.0.1: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)]
Tue Nov 12 15:38:20 PST 2002:RMI:RMI TCP Connection(4853)-172.16.103.94:[172.16.103.94: sun.rmi.transport.DGCImpl[0:0:0, 2]: void clean(java.rmi.server.ObjID[], long,java.rmi.dgc.VMID, boolean)]
can some one pls tell me know to interpret the messages, what does the number 4853 in TCP Connection(4853) mean ? thanks a lotBasically it is:
date:subsystem:threadid:[remote object[object-id]:method]The 4853 is part of the thread-id and it is something like an instance number of the thread class.
EJP
Maybe you are looking for
-
Help required please. "Itunes can not read the contents of my iphone"
Greetings all, I know this question has been asked before and I apologize for asking again but all the solutions provided don't seam to work for me, can anyone help me please. I am receving the message: "Itunes can not read the contents of the iPhone
-
Tethered capture issues-5D Mark II a Mac OS 10.6.8
I've been shooting tethered for some time, and have never had an issue. I'm in the middle of a shoot, have been shooting for about 3 days (obviously, not conistenly) and now, seemingly out of no where, no matter what I do Lightroom keeps saying 'No C
-
Downloading data from internal table to xls file leading zeros are not disp
Hai abap gurus, when i am downloading data from internal table to excle file. some field values in a column are with leading zeros and some others dont have leading zeros.but in the output it is showing without leading zeros. then how to get with exa
-
On previous versions I simply clicked on a picture in BR and it came up in P/S at the moment it defaults to Windows photo viewer. I also get a version of Elements editor 12 trial showing in the "open with" table that I would like to get rid of ?
-
Limited Logistics users and User Defined Fields - UDF
The SAP "Overview of SAP Business One License User Types" shows, in the last section under General, that only Professional users have any access at all to User-defined fields and tables. This seems counterintuitive as these fields are usually set up