[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

RMI Stub

Asked by sbalasuriya in Java Programming Language, Java Standard Edition

Tags: rmi, stub, exception

Hi,

I have written a class as ListenerImpl ;
-----------------------------------------------------------------------------------------------------
package dbmscg.network;

import java.rmi.*;
import java.rmi.server.*;
import java.rmi.server.*;
import java.net.*;

public class ListenerImpl extends UnicastRemoteObject implements Listener {

  //Default constructor.
  public ListenerImpl() throws RemoteException{
  }

  public void test() throws RemoteException{
      System.out.println("Testing...");
  }

}

--------------------------------------------------------------------------------------------------------------

And it implements Listener;

------------------------------------------------------------------------------------------
package dbmscg.network;

import java.rmi.*;

public interface Listener extends Remote {

  public void test() throws RemoteException;
}

-----------------------------------------------------------------------------------------

And I'm initializing ListenerImpl in another class ;

package dbmscg.server.servermanager;

import java.util.*;
import java.io.*;
import java.rmi.*;
import dbmscg.io.*;
import dbmscg.network.*;

public class Server {



  public Server() {
  }

  //Main method for the system.
  public static void main(String args[]) {
    startServer();
  }

  //To start the server.
  private static void startServer() {

    boolean serverStarted = true;

    //Create an instance of FileManager.
    FileManager fileManager = new FileManager();

    //Create an instance of ListenerImpl.
    ListenerImpl serverListener = null;
    try {
      serverListener = new ListenerImpl();
      String listenerServer = "//localhost/listenerserver";
      Naming.bind(listenerServer, serverListener);
      System.out.println("Listener bound");
    } catch (RemoteException r) {
      System.err.println(r.getMessage());
    } catch (Exception e) {
      System.err.println(e.getMessage());
    }

    while (serverStarted=true) {
    }
  }

  public void createDatabase(String DBname, String baseDir, Boolean automatic){

  }

  public void removeDatabase(String DBname) {

  }

}


----------------------------------------------------------------------------------------------------------------

I have compiled all the classes. And used rmic on ListenerImpl.class. _Stub and _Skel class are there but when I try to run the server.class it always give the message;

RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: dbmscg.network.ListenerImpl_Stub

Please help.

Thanks in advance.

-Sanjaya
 
Loading Advertisement...
 
[+][-]05/05/04 06:46 AM, ID: 10995949Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/05/04 06:47 AM, ID: 10995952Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/05/04 06:48 AM, ID: 10995963Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/05/04 07:37 AM, ID: 10996463Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/05/04 08:01 AM, ID: 10996722Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/05/04 08:03 AM, ID: 10996754Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/05/04 08:41 PM, ID: 11002095Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/05/04 08:44 PM, ID: 11002110Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/04/04 05:05 AM, ID: 11714420Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08/09/04 09:35 AM, ID: 11754390Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Java Programming Language, Java Standard Edition
Tags: rmi, stub, exception
Sign Up Now!
Solution Provided By: Netminder
Participating Experts: 3
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81