Greetings!

I am trying to set up OJB in client/server mode.
I am using OJB 0.9.4 ODMG API with MS SQL Server.
The client and server are on the same machine.
I have a test case which works fine in single vm mode,
but when I switch to client/server, I get an error. More information below.
Has anyone experienced this problem? Any ideas on what is causing it and
how to fix it? The exception is thrown when I try to open the database.

=================================================================================
The Code which causes the Error
================================================================================
    protected void setUp()
    {
        if ( dbName == null )
        {
            try
            {
                dbName = ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
                              .getConfigurator()
                              .getConfigurationFor(null))
                              .getRepositoryFilename();
            }
            catch ( ConfigurationException e )
            {
                dbName = "repository.xml";
            }
        }
        try
        {
            if ( odmg == null ) { odmg = OJB.getInstance(); }
            if ( odmg != null && db == null ) 
            { 
                db = odmg.newDatabase();
                db.open(dbName, Database.OPEN_READ_WRITE);  // <== Exception Thrown 
Here
            }
        }
        catch ( Throwable t )
        {
            LogService.logError("setUP ERROR: " + t.getMessage(), 
OJBTest.class.getName(), t);
            fail( "OJBTest::setUp ERROR: " + t.getMessage() );
        }
    }

=================================================================================
Exception Stack Trace on Client Side
=================================================================================
2002-09-25 13:36:43,203 ERROR [main] edu.tamu.finance.fw.data.ojb.OJBTest - setUP 
ERROR: Error while communicating with OJB server
org.apache.ojb.broker.PersistenceBrokerException: Error while communicating with OJB 
server
        at org.apache.ojb.broker.server.PersistenceBrokerClient.callServer(Unknown 
Source)
        at org.apache.ojb.broker.server.PersistenceBrokerClient.callServer(Unknown 
Source)
        at org.apache.ojb.broker.server.PersistenceBrokerClient.close(Unknown Source)
        at org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source)
        at edu.tamu.finance.fw.data.ojb.OJBTest.setUp(OJBTest.java:86)
        at junit.framework.TestCase.runBare(TestCase.java:138)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:131)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
Caused by: java.io.EOFException
        at 
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2150)
        at 
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2619)
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:726)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
        at org.apache.ojb.broker.server.BetterObjectInputStream.<init>(Unknown Source)
        ... 14 more


=================================================================================
Console Output for Server
=================================================================================
[BOOT] INFO: OJB.properties: file:/C:/projects/fw-ojb/build/WEB-INF/classes/OJB.
properties
[BOOT] INFO: no port specified, will use default: 2001
[BOOT] INFO: PersistenceBrokerServer is accepting connections on port 2001
[org.apache.ojb.broker.server.RequestProcessor] DEBUG: dispatching 
[30,-1,repository.xml,null,null]
[org.apache.ojb.broker.server.RequestProcessor] DEBUG: dispatching 
[32,-1,null,null,null]
[org.apache.ojb.broker.server.ConnectionHandler] ERROR: 
org.apache.ojb.broker.server.Request@76e369
[org.apache.ojb.broker.server.ConnectionHandler] ERROR: java.lang.NullPointerException
        at org.apache.ojb.broker.util.logging.PoorMansLoggerImpl.log(Unknown Source)
        at org.apache.ojb.broker.util.logging.PoorMansLoggerImpl.error(Unknown Source)
        at org.apache.ojb.broker.util.logging.PoorMansLoggerImpl.error(Unknown Source)
        at org.apache.ojb.broker.server.ConnectionHandler.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:536)


Thanks.

Shannon Hardt

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to