db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)
Date Sat, 20 May 2006 02:42:16 GMT
Dag.Wanvik@Sun.COM (Dag H. Wanvik) writes:

> Hi,
>
> I looked at this again: This is my understanding so far.

Ooops. The analysis in my previous post was for the test
DerbyNetNewServer.java, which has a similar symptom in my
environment. For NSinSameVM.java, I found that the connection is
actually *not* closed prior to shutdown:

 :
 // Leave the connection open before shutdown to make 
 // sure the thread closes down. 
 // connection.close();
 :
 serverControl.shutdown();

By uncommenting the close, the test passed. I am not sure what the
meaning of the above comment is.

Anyway, it would seem my explanation in my previous post is the whole
story here. One hypothesis might be that the error occurs at shutdown
when the connection is not closed, but then, I don't understand why it
works if run from jars. Can anyone shed some light on this?

Dag
>
> I think this is a problem with the test and/or the server code.
> Apperently there is a race condition between the connection being
> closed and the shutdown of the server.  This test starts its own
> server and then opens and closes a connection to it, in this case via
> the derby client driver.  Skeleton code:
>
>   server.start
>   conn = DriverManager.getConnection(<derby client>)
>   conn.close
>          <inserting a small sleep here makes problem go away>
>   server.shutdown
>
> By inserting a small sleep between the close and the shutdown, the
> test works in my environment. I would guess the problem appears
> because the server gets to (start) shut down *before* the close
> message process is started/completed, and when the server DRDA
> protocol code is in the process of handling the close, the server is
> going down, hence the class not found exceptions.
>
> I'll file a JIRA for the test.
>
> The larger question is: Is there any way to avoid this in the server?
> Users can hit this one, too, and it would be nice if the server were
> more rubust. I think is possibly related to the problem discussed
> under JIRA-1219 and DERBY-1326, although in those cases, the problems
> occur further down the line: ghost sessions remain after shutdown
> causing trouble on restart. 
>
> Dag
>
>
> David Van Couvering <David.Vancouvering@Sun.COM> writes:
>
>> On Solaris x86 on JDK 1.4, I am getting the following diff in my
>> derbynetclient tests:
>>
>> java.lang.NoClassDefFoundError:
>> org/apache/derby/impl/drda/DRDAProtocolExceptionInfo
>>         at
>> org.apache.derby.impl.drda.DRDAProtocolException.<clinit>(DRDAProtocolException.java:108)
>>         at
>> org.apache.derby.impl.drda.DRDAConnThread.markCommunicationsFailure(DRDAConnThread.java:411)
>>         at org.apache.derby.impl.drda.DDMReader.fill(DDMReader.java:1724)
>>         at
>> org.apache.derby.impl.drda.DDMReader.ensureALayerDataInBuffer(DDMReader.java:1473)
>>         at
>> org.apache.derby.impl.drda.DDMReader.readDssHeader(DDMReader.java:315)
>>         at
>> org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:628)
>>         at
>> org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:238)
>>
>> I get the same error for DerbyNetNewServer
>>
>> I looked in my classes directory, the class is definitely there.
>>
>> I checked the regression tests, and this message is not there.
>>
>> Does anyone have any ideas what this might be about?  I'm not sure how
>> much time I am willing to spend tracking this down, but it is a little
>> disconcerting...
>>
>> Thanks,
>>
>> David
>>

Mime
View raw message