Beginner running RMI example problem

I am trying to test this RMI code from Thinking in java and it is giving this error
Exception in thread "main" java.lang.NoClassDefFoundError: DispatchPerfectTime (
wrong name: project3/rmi/DispatchPerfectTime)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
6)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
I compiled the 3 files below and also called rmic and created a stub and skeleton..... Only it doesnt run..
Any ideas why ?
INTERFACE
package project3.rmi;
import java.rmi.*;
interface PerfectTimeI extends Remote
     long getPerfectTime() throws RemoteException;
}Implementation of Remote interface
package project3.rmi;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
import java.net.*;
public class PerfectTime extends UnicastRemoteObject implements PerfectTimeI
     public long getPerfectTime() throws RemoteException
          return System.currentTimeMillis();
     //constructor to throw remote exceptions
     public PerfectTime() throws RemoteException
          //super(); called automatically
     //register for rmi server
     public static void main(String args[]) throws Exception
          LocateRegistry.createRegistry(2005);
          System.setSecurityManager(new RMISecurityManager());
          PerfectTime pt = new PerfectTime();
     Naming.rebind("//200.23.23.2:2005/PerfectTime",pt); //I put dummy IP instead of my real IP
          System.out.println("Ready to do time");
}USING REMOTE OBJECT
/**Using the remote object**/
package project3.rmi;
import java.rmi.*;
public class DispatchPerfectTime
     public static void main(String args[]) throws Exception
          System.setSecurityManager(new RMISecurityManager());
          PerfectTimeI t = (PerfectTime)Naming.lookup("//200.23.23.2:2005/PerfectTime");
          for(int i =0;i<10;i++)
          System.out.println("Perfect Time is "+t.getPerfectTime());
}

I am just using another RMI example from class now...
All files are compiling but this is error.....
C:\>java -classpath c:\ RMIServer
Starting Server
Started Server...
Binding to RMI Registry
Error RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: RMIServer_Stub
I doono if my host is correct...... I donno what to write in place of test... its some service??
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
public class RMIServer extends UnicastRemoteObject implements RMIInterface
  static String host = "rmi://IPAddress/test";
  static String data[] = {"c","c++","java"};
  public RMIServer() throws RemoteException
            super();
  //implement methods
  public int getNumData() throws RemoteException
            return data.length;
  public String getData(int index) throws RemoteException
          if(index>=0 && index<data.length)
               return data[index];
          else
               return "N/A";
  public static void main(String args[])
       RMIServer server;
       try{
            System.out.println("Starting Server");
            server = new RMIServer();
            System.out.println("Started Server...");
              System.out.println("Binding to RMI Registry");
            Naming.rebind(host,server);
            System.out.println("Remote methods registered successfully");
       catch(Exception e){
            System.out.println("Error "+e.getMessage());
  }//main
} //class

Similar Messages

  • Help me to run this simple RMI example

    When i m running this example in standalone pc it works but while running on to different pc it gives error though I m giving the IP address from client of server.. If anyone can help me out plz help.
    Code:
    ReceiveMessageInterface
    import java.rmi.*;
    public interface ReceiveMessageInterface extends Remote
    void receiveMessage(String x) throws RemoteException;
    Server code:
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.rmi.server.*;
    import java.net.*;
    public class RmiServer extends java.rmi.server.UnicastRemoteObject
    implements ReceiveMessageInterface
    int thisPort;
    String thisAddress;
    Registry registry; // rmi registry for lookup the remote objects.
    // This method is called from the remote client by the RMI.
    // This is the implementation of the �ReceiveMessageInterface�.
    public void receiveMessage(String x) throws RemoteException
    System.out.println(x);
    public RmiServer() throws RemoteException
    try{
    // get the address of this host.
    thisAddress= (InetAddress.getLocalHost()).toString();
    catch(Exception e){
    throw new RemoteException("can't get inet address.");
    thisPort=3232; // this port(registry�s port)
    System.out.println("this address="+thisAddress+",port="+thisPort);
    try{
    // create the registry and bind the name and object.
    registry = LocateRegistry.createRegistry( thisPort );
    registry.rebind("rmiServer", this);
    catch(RemoteException e){
    throw e;
    static public void main(String args[])
    try{
    RmiServer s=new RmiServer();
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    Client code:
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.net.*;
    public class RmiClient
    static public void main(String args[])
    ReceiveMessageInterface rmiServer;
    Registry registry;
    String serverAddress=args[0];
    String serverPort=args[1];
    String text=args[2];
    System.out.println("sending "+text+" to "+serverAddress+":"+serverPort);
    try{
    // get the �registry�
    registry=LocateRegistry.getRegistry(
    serverAddress,
    (new Integer(serverPort)).intValue()
    // look up the remote object
    rmiServer=
    (ReceiveMessageInterface)(registry.lookup("rmiServer"));
    // call the remote method
    rmiServer.receiveMessage(text);
    catch(RemoteException e){
    e.printStackTrace();
    catch(NotBoundException e){
    e.printStackTrace();
    }

    When we compile with rmic skeleton and stub get created then we hav to place stub at each client ???Your remote client applcation need only _Stub.class fiels.
    Is there way by which we can know how many clients are connected to the
    server and there IP address, can anyone give the code... I guess that you should use a RMI login/logout method to register/unregister your client connection information into a databse or a simple static Hashtable(Vector) object.

  • I have error when I run a rmi example!

    I am a new in RMI. When I run a example, it have error:
    java.rmi.ConnectionException: Connection refused to host: localhost;nested exception is: java.net.ConnectionException: Connection refused: connect
    Help me!

    first step must be run
    rmiregistry
    after that you can run rmi server and sure that the IP of machine that you need to run RMI server on it

  • Problem running your example with TCL in TestStand 2.0

    I`m having problems trying to run your example: "Calling TCL Scripts from TestStand 1.0.x". I use TestStand 2.0. In fact, I don`t see any response when running first step in a sequence. Could it be issues related to the TestStand version.

    The example should work in TestStand 2.0.x, since other users have reported that they have successfully done so and nothing has changed in TestStand 2.0.x that would affect its execution.
    In order to get the example to work you will need to have the TCL interpreter installed correctly so that the dll being used in the example can invoke it. If you can programmatically control the interpreter with any other code module as this dll does then this example should work as well. However, if you cannot do this in any way on your system then it is safe to say that nothing will work including the example. Verify that the TCL interpreter will work in this fashion per the vendor's instructions and then try the example again. If you are receiving errors from TestStand
    when executing the sequence let us know about those and we may be able to help you more directly.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Hi my mac book pro is having some problem with mouse , With out my actions it's automatically running for example If I open some site the arrow is automatically pressing every where if u don't mind can u suggest me what I have to do

    Hi
    I am facing some problem mouse arrow with out my actions it's automatically running for example If I open a some site the arrow mark is going every where and automatically pressing and the particular sites are opening if u don't mind can u suggest me what I have do

    If you can still access the machine and haven't wiped the drive, open the Mac App Store, log in to your Apple ID, and try to download Mavericks from there. If it works, make a bootable USB from the
    Mavericks installer (google how to do this). Then boot to the USB wipe the drive and install Mavericks clean. And since it shoudl be associated with your Apple ID at that point you shouldn't have any issues.

  • Problem of running rmi applet and client for Javacard 3.0.2 Connected

    Need help for running rmi application for Java Card 3.0.2 connected version. I am trying to move a working rmi applet & client from 3.0.2 Classic version to Connected version. Then I found that they are so different and I have no idea how to run my application :(
    Here are what I have done:
    - I have modified the Classic HelloWorld applet to an rmi applet. It is OK when I build and run the application in netbeans. The Applet can be selected successfully.
    My problems are:
    - How to connect a rmi client to the rmi applet? Here are what I have done:
    + Run rmi applet in netbeans
    + Run 'rmic' command to generate stub
    + Run rmiregistry outside of netbeans
    + Build and run rmi client application outside of netbeans by typing "ant all"
    However, the rmi client was not able to connect to the applet:
    [java] java.net.ConnectException: Connection refused: connect
    Would this be a problem of netbeans? Could someone tell me how to run rmi applet/client within or outside netbeans. Thanks a lot!

    Well finally I figured out that CREF-emulators (from JCDK 2.2.1, 2.2.2, 3.0.1 classic) do not support cryptographic extensions at all.
    BUT JCWDE(from JCDK 2.2.1, 2.2.2) - support, but this kind of simulator quite hard to use, because it does not have state between launches.
    About CJCRE(from JCDK 3.0.1 connected) - still don't know, seems not support cryptographic extensions.

  • RMI SSL problem

    Hi, I am learning RMI whit SSL and I have a problem, I cant run the example form the RMI SSL tutorials.
    I can run the server, and bind the object but the client throw this exception:
    HelloClient exception: error during JRMP connection establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:274)
    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.lookup(Unknown Source)
    at HelloClient.main(HelloClient.java:60)...
    can you help me???

    Hi,
    Dis you solved the probelm ? I am facing the similar exception. I am using jre1.5.0_11.
    Regards,
    Titas Mutsuddy

  • RMI Rebind problem

    Hi
    I'm a novice on RMI and have been trying to learn the concept by copying the HelloWorld RMI example from the Java Tutorials to run on my Windows 98 PC. However, when I issued a DOS command: Java HelloImpl, the following error came up:
    " Access denied (java.net.SocketPermission .....1099 connect resolve)"
    Any suggestions what possible cause of the problem ?
    Thanks.

    check the permissions in your policy file.

  • RMI example just doesn't work (jdk1.5.0_01+jdk1.5.0)

    Hi!
    RMI example from the "Getting Started Using Java RMI" (http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html) doesn't work.
    Everything compiles fine , but when starting server with a command:
    java -classpath test example.hello.Server
    it says (on Linux Fedora Core 2):
    Server exception: java.lang.NullPointerException
    java.lang.NullPointerException
    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 example.hello.Server.main(Server.java:61)
    On the Windows( XP SP2) it says:
    Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    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:595)
    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 example.hello.Server.main(Server.java:61)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    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:595)
    Caused by: java.lang.ClassNotFoundException: example.hello.Hello
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:707)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:651)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:588)
    at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
    at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
    at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
    at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    ... 9 more
    Is it possible to make it work somehow?
    Thank you!
    Dmitriy Ulupov

    There is quite enough data in the exception to figure this out, and the answer is 'none of the above'. Have a look at this:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    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:595)
    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)The basic problem is java.lang.ClassNotFoundException: example.hello.Hello
    and it occurs remotely when executing Naming.bind, i.e. it happens in the Registry. In other words the Registry cannot find examples.hello.Hello. There are several solutions to this including modifying the Registry's classpath or using the RMI codebase feature.

  • WLS 7.0 JTA Oracle example problem

    Hi,
    I am trying to get the Weblogic 7.0 JTA, Oracle example working.
    This example uses two deployed EJB's and different data sources to
    transfer money from one to the other.
    The example specifies that one of the database pools should be using
    an OCI driver. Unfortunatley I don't have these drivers, and really
    only want to use the Oracle JDBC thin drivers. The drive I am using is
    oracle.jdbc.xa.client.OracleXADataSource
    I have set up two database connection pools, both using XA Java thin
    drivers.
    Every time I run the example is throws an XA error: XAER_PROTO. I
    think this is something to do with the XA transaction not being setup.
    Have you been able to get the example to work???
    Is there some technique in setting up Oracle XA database pools, and
    datasources that I am missing?
    I am using Oracle 8.1.7.
    Thanks for your help.
    Regards.
    Andy
    Here is the stack trace when I try and run the example.
    TX: [EJB examples.jta.oracle.SavingAccountBean.findByPrimaryKey(java.lang.String)],
    setEntityContex
    called
    TX: [EJB examples.jta.oracle.SavingAccountBean.findByPrimaryKey(java.lang.String)],
    ejbFindByPrimar
    Key (ID: 1)
    TX: [EJB examples.jta.oracle.SavingAccountBean.findByPrimaryKey(java.lang.String)],
    ejbFindByPrimar
    Key (ID: 1) found
    TX: [EJB examples.jta.oracle.CheckingAccountBean.findByPrimaryKey(java.lang.String)],
    setEntityCont
    xt called
    TX: [EJB examples.jta.oracle.CheckingAccountBean.findByPrimaryKey(java.lang.String)],
    ejbFindByPrim
    ryKey (ID: 2)
    TX: [EJB examples.jta.oracle.CheckingAccountBean.findByPrimaryKey(java.lang.String)],
    SQLException:
    java.sql.SQLException: XA error: XAER_PROTO : Routine was invoked in
    an inproper context start() f
    iled on resource 'oracleXAPool': XAER_PROTO : Routine was invoked in
    an inproper context
    javax.transaction.xa.XAException
    at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:146)
    at weblogic.jdbc.jta.VendorXAResource.start(VendorXAResource.java:41)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:569)
    at weblogic.transaction.internal.ServerResourceInfo.start(ServerResourceInfo.java:1165)
    at weblogic.transaction.internal.ServerResourceInfo.xaStart(ServerResourceInfo.java:1108)
    at weblogic.transaction.internal.ServerResourceInfo.enlist(ServerResourceInfo.java:287)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl
    java:391)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1146)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1101)
    at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:145)
    at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:211)
    at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:139)
    at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:92)
    at examples.jta.oracle.CheckingAccountBean.ejbFindByPrimaryKey(CheckingAccountBean.java:277
    at examples.jta.oracle.CheckingAccountBean_qbus5p_Impl.ejbFindByPrimaryKey(CheckingAccountB
    an_qbus5p_Impl.java:197)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.BeanManagedPersistenceManager.findByPrimaryKey(BeanManagedPersist
    nceManager.java:35)
    at weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.java:510)
    at weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityManager.java:4
    4)
    at weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:369)
    at examples.jta.oracle.CheckingAccountBean_qbus5p_HomeImpl.findByPrimaryKey(CheckingAccount
    ean_qbus5p_HomeImpl.java:100)
    at examples.jta.oracle.CheckingAccountBean_qbus5p_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:785)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)

    Thanks it worked. Somehow I missed in documentation this x.509 setting.
    I've also had a problem with setting "Client Certificate Requested But Not Enforced"
    in WLS 7.0.0 but it seems to be working fine in SP1.
    Thanks again
    Greg
    "kirann" <[email protected]> wrote:
    hi,
    I believe you need to turn on x.509 Identity Assertion in the server
    console..
    Please check the documention.
    thanks
    kiran
    "Greg" <[email protected]> wrote in message
    news:3e243a25$[email protected]..
    Hi!
    I'm trying to set up my web application to use client-cert
    authentication. I've set in web.xml login config to
    <auth-method>CLIENT-CERT</auth-method>. When I'm accessing my
    application I'm always getting 401 Unauthorized. If I set
    login to BASIC, browser pops up login dialog and everything works
    fine.
    I've done following:
    - created and installed in WLS trusted CA certificate
    - created and installed client certificate signed by that CA in
    IE 5.5
    - configured WLS to use ssl and set "Client Certificate Enforced"
    - managed to connect to document root or console application
    using https://localhost:7002/console and verified that accually client
    certificate
    is used (not able to connect without one)
    Now I'm really stuck and have no ideas.
    Please help. Thanks in advance.
    Greg

  • JBoss3 basic example problem

    I started an common example of stateless bean HelloWorld on JBoss 2.4 server and it works,but when I tried to start the identical example on JBoss 3.0 following problem has occurred. During the deploy process there was no any error messages on JBoss console.
    Here is console output after running the example:
    D:\Users\maja\klase>java -classpath "d:/users/maja/jbossDeploy/j2ee.jar;d:/users
    /maja/jbossDeploy/log4j.jar;d:/users/maja/jbossDeploy/jboss-common-client.jar;d:
    /users/maja/jbossDeploy/jnp-system-client.jar;d:/users/maja/jbossDeploy/jnp-clie
    nt.jar;d:/users/maja/jbossDeploy/jboss-client.jar;d:/users/maja/jbossDeploy/jbos
    ssx-client.jar;C:\jdk1.3.1_01\jre\lib\rt.jar;.;HelloWorld.jar" HelloWorldClient
    javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalExcept
    ion: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair
    (no security manager: RMI class loader disabled)
    java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no sec
    urity manager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
    at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.inputObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at HelloWorldClient.main(HelloWorldClient.java:20)
    Exception: null
    I don't know how to solve this problem and I will be very thankful if you help me.

    Hi,
    Where is the jboss.jar mentioned?The error is due to unavialibility of the class,the classloader is not able to find(load) the class.So please set jboss.jar,it is avialable at Jboss3.0.2/server/all/lib/jboss.jar.
    I used to try this way long back but I found the ant tool to be better utility to work with.Why dont you check the Orielly Workbook at the google and download it.
    Regards
    Vicky

  • Stocks RMI example not working - Security Exception

    Hi,
    I was trying to run the "Stocks" RMI example that comes with
    Weblogic server(see
    http://www.weblogic.com/docs45/classdocs/API_rmi.html#clientside)
    I compiled and configured the appropriate files, and tried to
    load the sample applet (StockApplet.java) loaded on the
    StockApplet.html page (using Microsoft IE browser).
    However, the applet generated the following exception :
    java.lang.ExceptionInInitializerError: com/ms/security/SecurityExceptionEx
         at weblogic/common/internal/TengahClassLoaders.registerURL (TengahClassLoaders.java:51)
         at weblogic/rjvm/RJVMImpl.loadFromCluster (RJVMImpl.java:1106)
         at weblogic/jndi/WLInitialContextFactoryDelegate.newContext (WLInitialContextFactoryDelegate.java:247)
         at weblogic/jndi/WLInitialContextFactoryDelegate.getInitialContext (WLInitialContextFactoryDelegate.java:205)
         at weblogic/jndi/Environment.getContext (Environment.java:122)
         at weblogic/jndi/Environment.getInitialContext (Environment.java:105)
         at weblogic/rmi/Naming.getContext (Naming.java:225)
         at weblogic/rmi/Naming.lookup (Naming.java:67)
         at examples/rmi/stock/StockApplet.init (StockApplet.java:127)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)
    As you can see this looks like some sort of security exception. (StockApplet.java:127)
    in the above exception is the line where StockApplet calls Naming.lookup(). So
    I'm guessing it has something to do with it getting the Weblogic's RMI support
    classes to the local VM and deserializing and installing them, which generates
    a security exception.
    What needs to be done to make the example work properly?
    Thanks,
    Leonid Portnoy
    (In addition, two more types of exceptions are generated, which might be related
    to the cause of the above exception. These exceptions are :
    com.ms.security.SecurityExceptionEx[weblogic/rjvm/JVMID.setLocalID]: cannot connect
    to "testserver"
         at com/ms/security/permissions/NetIOPermission.check (NetIOPermission.java)
         at com/ms/security/PolicyEngine.deepCheck (PolicyEngine.java)
         at com/ms/security/PolicyEngine.checkPermission (PolicyEngine.java)
         at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
         at com/ms/security/StandardSecurityManager.chkex (StandardSecurityManager.java)
         at com/ms/security/StandardSecurityManager.checkConnect (StandardSecurityManager.java)
         at java/net/InetAddress.getLocalHost (InetAddress.java)
         at weblogic/rjvm/JVMID.setLocalID (JVMID.java:59)
         at weblogic/rjvm/JVMID.localID (JVMID.java:43)
         at weblogic/rjvm/LocalRJVM.getID (LocalRJVM.java:143)
         at weblogic/rmi/extensions/BasicServerObjectReference.<init> (BasicServerObjectReference.java:44)
         at weblogic/rmi/extensions/BasicServerObjectAdapter.<init> (BasicServerObjectAdapter.java:43)
         at weblogic/rmi/extensions/BasicRequestHandler.<init> (BasicRequestHandler.java:30)
         at weblogic/rmi/extensions/BasicRequestDispatcher.<init> (BasicRequestDispatcher.java:42)
         at weblogic/rmi/internal/OIDManager.initializeDGCServer (OIDManager.java:267)
         at weblogic/rmi/internal/OIDManager.getReplacement (OIDManager.java:176)
         at weblogic/rmi/internal/OIDManager.replaceObject (OIDManager.java:84)
         at weblogic/rmi/server/UnicastRemoteObject.exportObject (UnicastRemoteObject.java:25)
         at examples/rmi/stock/StockApplet.init (StockApplet.java:110)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)
    and
    com.ms.security.SecurityExceptionEx[weblogic/jndi/Environment.getProperty]: Unable
    to access system property: weblogic.jndi.provider.rjvm
         at com/ms/security/permissions/PropertyPermission.check (PropertyPermission.java)
         at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
         at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
         at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
         at com/ms/security/StandardSecurityManager.checkPropertyAccess (StandardSecurityManager.java)
         at java/lang/System.getProperty (System.java)
         at weblogic/jndi/Environment.getProperty (Environment.java:598)
         at weblogic/jndi/Environment.getProviderRJVM (Environment.java:691)
         at weblogic/jndi/WLInitialContextFactoryDelegate.getInitialContext (WLInitialContextFactoryDelegate.java:166)
         at weblogic/jndi/Environment.getContext (Environment.java:122)
         at weblogic/jndi/Environment.getInitialContext (Environment.java:105)
         at weblogic/rmi/Naming.getContext (Naming.java:225)
         at weblogic/rmi/Naming.lookup (Naming.java:67)
         at examples/rmi/stock/StockApplet.init (StockApplet.java:127)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)

    Can you post the Stock Applet and other source files...
    Jamal
    ([email protected])

  • GetResources() gives null's after using RMI (ClassLoader problem???)

    Hi
    I have just put RMI into my app and it works fine, connects to a remote server, runs a method on the server and returns the results.
    The problem is when I try to use a line like:
    URL url = MyClass.class.getResources("image/save.gif");
    The url is null. This code will work before my RMI function is run. Also, every dialog the application opens after running RMI has a line at the top of the pane saying: "Java Applet Window".
    Is RMI playing with the Classloader?
    Do I have to instaniate the ClassLoader or do something else to get my resources again and get rid of the text on each of the dialog boxes???
    Thanks in advance.

    if your class is Remote object, you use the RMI CLassLoader when you do:
    URL url = MyClass.class.getResources("image/save.gif");you shoud use instead:
    URL url = Classloader.getSystemResources("image/save.gif");

  • Trying to run the example "rf record and playback reference application"

    http://zone.ni.com/devzone/cda/epd/p/id/5894   trying to run this example but a lot of files are not being found.  I'm using Labview 8.5 with version 4 of the sound and vibration toolkit.  I suspect the problem is the old toolkit version.  Can someone confirm? Can't find any info on upgrading to toolkit so I suppose it would mean a new purchase?  thanks

    Hello Mike,
    This example is designed for our RF Hardware platform.  You need the RFSG driver, RFSA driver, Spectral Measurements Toolkit, Modulation Toolkit, and the advanced signal processing toolkit for the example to run.  You should be able to see this under the software requirements at the bottom of the page.  The two drivers should be available for download on our website, but the toolkits must be purchased and they aren't generally available with the dev suite.
    I hope this helps,
    Paul C
    Message Edited by Paul C. on 03-11-2010 12:28 PM

  • RMI Marshalling Problem:  weblogic.Admin PING

    WebLogic 5.1.0 with service pack 8 has been installed on a HPUX server. I'm
    trying to ping the server from an NT box, but I'm getting some RMI
    marshalling problems.
    Here is the command that I run on NT:
    C:\weblogic\jre1_2\jre\bin\java -classpath
    c:weblogic/lib/weblogic510sp.jar;c:/weblogic/classes;c:/weblogic/lib/weblogi
    caux.jar weblogic.Admin t3://HPServer:7001 PING > MarshallingProblem.txt
    Here is what is in MarshallingProblem.txt (modified server name):
    Failed to connect to t3://HPServer:7001 due to:
    [weblogic.rmi.UnexpectedException: Marshalling:
    - with nested exception:
    [weblogic.rjvm.PeerGoneException:
    - with nested exception:
    [weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Exception
    creating response stream ] - with nested exception:
    [java.io.InvalidClassException:
    weblogic.security.acl.internal.AuthenticatedUser; Local class not
    compatible: stream classdesc serialVersionUID=6699361079932480379 local
    class serialVersionUID=2825328378974757378]]]]
    I previously had similar problems pinging the server from the server itself
    until I included the servicepack in the classpath.
    Anyone have any idea what going on in this situation?
    Cameron Taggart

    Cameron
    Can you test with sp8 installed on your NT machine too ? And also make
    sure you set the classpath with the sp8 jar files on NT before you run
    weblogic.Admin PING
    Raj Alagumalai
    Cameron Taggart wrote:
    WebLogic 5.1.0 with service pack 8 has been installed on a HPUX server. I'm
    trying to ping the server from an NT box, but I'm getting some RMI
    marshalling problems.
    Here is the command that I run on NT:
    C:\weblogic\jre1_2\jre\bin\java -classpath
    c:weblogic/lib/weblogic510sp.jar;c:/weblogic/classes;c:/weblogic/lib/weblogi
    caux.jar weblogic.Admin t3://HPServer:7001 PING > MarshallingProblem.txt
    Here is what is in MarshallingProblem.txt (modified server name):
    Failed to connect to t3://HPServer:7001 due to:
    [weblogic.rmi.UnexpectedException: Marshalling:
    - with nested exception:
    [weblogic.rjvm.PeerGoneException:
    - with nested exception:
    [weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Exception
    creating response stream ] - with nested exception:
    [java.io.InvalidClassException:
    weblogic.security.acl.internal.AuthenticatedUser; Local class not
    compatible: stream classdesc serialVersionUID=6699361079932480379 local
    class serialVersionUID=2825328378974757378]]]]
    I previously had similar problems pinging the server from the server itself
    until I included the servicepack in the classpath.
    Anyone have any idea what going on in this situation?
    Cameron Taggart

Maybe you are looking for

  • How come my notes on outlook for office Mac not syncing to iPad 2

    Hi folk, I am a bit curious as to why when I created notes within outlook 2011 ( office Mac 2011) I don't see them on my iPad device? On my iPad/cloud services/ notes sync is on Also under settings/ notes "iCloud" is checked What am I missing here ?

  • Help! Quickest way to get up and running!!

    I have suffered a SMART failure after lion install as described here: https://discussions.apple.com/message/19063468#19063468 Ideally I want to be able to get my drive working again but if not reinstall my time machine back up from three days ago! No

  • 32" LCD TV turns on when on standby

    My tv is just under a year old,  in the time i have had it it has twice switched its self on  whilst on standby, is this something that  can be fixed if so how.

  • Can iChat on Mac talk to iOS  FaceTime devices

    I have Facetime on my iOS devices, as indeed many of my family and friends. I also have installed FaceTime app on the iMac and I dont really like it.  It does seem to fit in well with the Aspect ratio of the Mac Display.  The contacts are in a black

  • Rge : F110

    When we run F110,DME file is generating when we  download. We want in .csv format Please tell me the configuration or program. JABEEN