Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: RMI problem

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default RMI problem

    Hello friends,
    I am running a RMI based client server application. When i run RMI server, i get the following error.

    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: RMI.Game

    I am running rmiregistry on the same machine. anybody has idea how to solve this problem?
    Thanks in advance.

    Regards,
    Zeeshan


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: RMI problem

    You need to make sure that the client has the RMI.Game class on its classpath I take it from that error.

    // Json

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: RMI problem

    but i get this error when i start server. Client has nothing to do when you start server.

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: RMI problem

    Let me rephrase.

    You need to make sure that the server has the RMI.Game class on its classpath

    It all boils down to a missing lib somewhere hence the class not found exception. Make sure both your client and server have the needed classes and libraries on the classpath.

    // Json

  5. #5
    Junior Member
    Join Date
    May 2009
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Re: RMI problem

    all the classes are on server and client classpath. But still getting error.

    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: RMI.Game

    any suggestion ??

    //zeeshan

  6. #6
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: RMI problem

    Is RMI.Game serializable?

    // Json

  7. #7
    Junior Member
    Join Date
    May 2009
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: RMI problem

    It is an interface which extends Remote class.