Jochen Vastmans wrote:
> 
> Hello,
> 
> I'm currently using JOnAS 1.5 and
> I'm having troubles with a remote client, using an applet to access
> the EJB server.
> 
> I looked in the FAQ, and there is so little written about the remote client.
> I hope you can guide me through this?
> 
> Before I had a classpath to all .jar files I need.
> So I unset the classpath to all those jar-files.
> 
> Then I put all jar-files in a file, classes.jar.
> But after I have started rmiregistry I have got the following problem when
> EJB-server :
> 
> java -Djava.security.policy=$JONAS_ROOT/java.policy -Dinstall.root=$JONAS_RO
> OT
> -Djava.rmi.server.codebase=/home/vastmans/public_html/classes/classes.jar
> org.objectweb.jonas.server.Server
> 
> I get an error:
> 
> Cannot rebind TM:
> javax.naming.CommunicationException [Root exception is
> java.rmi.ServerException:
> RemoteException occurred in server thread; nested exception is:
> java.rmi.UnmarshalException: error unmarshalling arguments; nested exception
> is:
> java.io.IOException: Malformed URL:
> /home/vastmans/public_html/classes/classes.jar]
> 
> When the client downloads the applet, he will also download the classes.jar.
> 
> Can you tell me what I'm doing wrong?
> I really need some help with this.
> 
> Can you give me the steps I have to follow to get this started...
> 
> Best Regards,
> 
> Jochen Vastmans
> 
> e-mail: [EMAIL PROTECTED]


Hi Jochen,

The problem is in your java.rmi.server.codebase property; the value
of that property must be a URL and not just a directory or file name.
Try it with the following if the jar file is to be retrieved by http:

 -Djava.rmi.server.codebase=
    http://<machine name>/~vastmans/classes/classes.jar

The machine in question must therefore be running a Web server.

The jar file can also be retrieved using the file protocol as follows:

 -Djava.rmi.server.codebase=
    file:/home/vastmans/public_html/classes/classes.jar

but this access would only work on machines (or a LAN) that can directly
acces that directory.

If your codebase happened to be a directory of classes (and not a jar
file
of classes), then you do the same thing except that you specify the name 
of the directory with a trailing slash, viz:
  -Djava.rmi.server.codebase=
     http://<machine name>/~vastmans/classes/

Hope this helps,
Kathleen


******************************************************************
Kathleen Milsted
France Telecom R&D
Distributed Systems Architecture department (DTL/ASR)
28 chemin du Vieux Chene
BP 98, 38243 Meylan Cedex
FRANCE
E-mail: [EMAIL PROTECTED]
Tel: +33 4 76 76 45 94
Fax: +33 4 76 76 45 57
******************************************************************
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to