Top.Mail.Ru
December 10th, 2004 - Java developers — LiveJournal
? ?

Java developers

December 10th, 2004
 

03:16 pm - Imagemoviescriptend - RMI help!

I'm having trouble connecting clients to an RMI server.

The server starts up without any problems.
server GameServer has been created on localhost:7777
and bound in the registry to the name GameServer


But I've got a Player object that I want to connect to GameServer. Here's the code:
        GameServer server = null;

try {
server = (GameServer)Naming.lookup("rmi://" + serverMachine +
"/" + serverName);
} catch (Exception e) {
System.err.println("Client exception " + e);
System.exit(1);
}




I can't figure out why an exception is being thrown.

Client exception java.lang.ClassCastException: GameServer_Stub


any help on what it means?
Image

10:29 pm - Imagetalldean

I'm trying to use a CLOB for the first time, using an Oracle 9 JDBC driver connecting to Oracle 9. No other problems with this, at all.

Essentially:

PreparedStatement ps = connection.getPreparedStatement("insert into foo (clob_column) values (?)");
ps.setString(1, "Anything here. At all.");
ps.executeQuery();

Hangs on the executeQuery(). No error. No exception. No nothing, just indefinite hang until the connection times out. I've tried ps.setAsciiStream(1, new InputStream(new ByteInputStream("anything here".getBytes())));, with the same effect.

Should I disregard my DBA's advice, and go with an Oracle LONG instead?
Powered by LiveJournal.com
Image