Hi, I've run into a weird problem and I can't find any old posts which address it. I've created a "ConnectionFactory" class which extends UnicastRemoteObject and implements ConnectionInterface (which just declares a getConnection() method). The ConnectionFactory has a main method which instantiates a copy of itself and attempts to bind itself to the registry using Naming.rebind(name,app). I don't attempt to create or locate the registry in my code. Next I compile it all and do a rmic on it and the stub files are created no problem. I then start the registry and then attempt to run the ConnectionFactory. However the problem is that seems to get stuck (ie doesn't through an exception, just hangs there) at the point in the line of code where it call Naming.rebind. Any idea why? Thanks.
I am going to ask you a silly question. Do you call printStackTrace() inside the catch block to display any exception thrown because of the rebind() method? Also try the following command before you start the rmiregistry: set CLASSPATH="parent directory for all your packages".
Joined: Feb 07, 2002
Thanks for the reply. Yes I do catch and print any exception. Here's the code
the last line of the output is "ConnectionFactory name = rmi://localhost:1099/ConnectionFactory I tried the classpath option but it didn't seem ot make any difference. [ April 16, 2002: Message edited by: Stephen Cowell ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com