You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by David Van Couvering <Da...@Sun.COM> on 2006/05/19 23:47:21 UTC

NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

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

Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi,

Bryan Pendleton <bp...@amberpoint.com> writes:
> I think it is too soon to tell whether the problems you are seeing
> are identical to those of DERBY-1326 and DERBY-1219, but I certainly
> think that this part of the system will benefit from having a number
> of contributors carefully analyzing it.

I created DERBY-1338 for this and posted a new analysis.

Dag

Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

Posted by Bryan Pendleton <bp...@amberpoint.com>.
>> 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:

This is very interesting! I don't know what is going on here, either, but
it sounds very similar to the issues that I've been investigating with
Deepa and Kathey under DERBY-1326 and DERBY-1219.

I'm hoping to put some effort into Network Server session/connection
management in the context of DERBY-1326.

I think it is too soon to tell whether the problems you are seeing
are identical to those of DERBY-1326 and DERBY-1219, but I certainly
think that this part of the system will benefit from having a number
of contributors carefully analyzing it.

thanks,

bryan


Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> 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?

Hi Dag,

Did you decide to file a separate JIRA entry for this? I think you
probably should; that is, I think we should assume that it's a
different bug from DERBY-1326 until we can prove otherwise.

thanks,

bryan


Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
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 <Da...@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
>>

Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi,

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

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 <Da...@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
>

-- 
Dag H. Wanvik
Sun Microsystems, Database Technology Group (DBTG)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101

Re: NSinSameVM can't find DRDAProtocolExceptionInfo class (solarisx86, JDK 1.4)

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
I am seeing this as well. It only happens when I run
from the classes directory, not when I run from jars.

Dag

David Van Couvering <Da...@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
>

-- 
Dag H. Wanvik
Sun Microsystems, Database Technology Group (DBTG)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101