How to look up a bean on Remote Machine

Discussions

EJB programming & troubleshooting: How to look up a bean on Remote Machine

  1. How to look up a bean on Remote Machine (2 messages)

    I have created a simple bean and its client is running fine if I run it on the server itself. But now when I try to run my client from some remote machine it give me an error that import package not found because that package is there on server. I don't no how to call the bean which is running on the server from the client on the remote machine.

    Thanks & Regards,
    Vishal (Vishal at ThatOne dot com)
  2. How to look up a bean on Remote Machine[ Go to top ]

    Hi,

    It is very simple:

    You must have an enterprise Bean Client Jar file and set it in your class path of client.

    To generate this EJB client jar file you can use the Deploy tool of some appserver or you can refer to that appServer doc for the resolution (how to make Client jar file)

    Hope this will help.
  3. Hi,
    i have the same problem but i'm not be able to solve it.
    Could you help me?

    Would i have to generate the EJB client jar file with the Deploy tool on the server or on the client(on the remote machine) ?

    Would i have to start the "j2ee server" on the server?

    Would i have to set the jar file in my class path of client in this way:
    set CPATH=.;%J2EE_HOME%\lib\j2ee.jar;ConverterAppClient.jar
    ?
    and to execute the class client (on the remote machine) in this way:
    C:\jdk1.2.2\bin\java -classpath "%CPATH%" ConverterClient ?

    At the moment when I run the client code which invoke EJB error occured:

    Caught an unexpected exception!
    javax.naming.CommunicationException: Can't find SerialContextProvider

    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:60)

    at com.sun.enterprise.naming.SerialContext.<init>(SerialContext.java:79)

    at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:54)

    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)

    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)

    at javax.naming.InitialContext.init(InitialContext.java:226)

    at javax.naming.InitialContext.<init>(InitialContext.java:182)

    at ConverterClient.main(ConverterClient.java:21)

    thanks in advance

    Simone Boccaccio