You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Daniel Noll <da...@nuix.com> on 2007/11/12 05:39:20 UTC
Network protocol error in prepareStatement()
Hi all.
I'm getting this unusual exception during prepareStatement():
Caused by: org.apache.derby.client.am.DisconnectException: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
at org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
The connection is from the host to itself so network issues should hopefully
be out of the picture. Any idea what causes this error? The derby log is completely
empty this time (no error messages, no success messages either.)
Daniel
Re: Network protocol error in prepareStatement()
Posted by Daniel Noll <da...@nuix.com>.
On Tuesday 13 November 2007 11:24:52 Kathey Marsden wrote:
> Daniel Noll wrote:
> > This is embedded in an application though so changing the connection
> > properties isn't going to be easy, but do you think changing the system
> > property derby.drda.debug to true on the server would generate enough
> > output to diagnose the problem?
>
> Daniel,
>
> I think for a deployed app, derby.client.traceDirectory and
> derby.client.traceLevel are your best bet for drda tracing. See:
>
> http://wiki.apache.org/db-derby/UndocumentedDerbyBehavior
Interestingly, in terms of queries...
It doesn't happen for:
SELECT DISTINCT id FROM items_tags WHERE id >= 0
But it does happen for:
SELECT items_tags.id AS id FROM tags, items_tags
WHERE LOWER(tags.name) = ?
AND tags.id = items_tags.tagid
AND items_tags.id >= 0
This much might give me a way to reproduce it standalone soon, as there aren't
many differences between the two at the end of the day.
Daniel
Re: Network protocol error in prepareStatement()
Posted by Kathey Marsden <km...@sbcglobal.net>.
Daniel Noll wrote:
>
> This is embedded in an application though so changing the connection
> properties isn't going to be easy, but do you think changing the system
> property derby.drda.debug to true on the server would generate enough output
> to diagnose the problem?
>
>
Daniel,
I think for a deployed app, derby.client.traceDirectory and
derby.client.traceLevel are your best bet for drda tracing. See:
http://wiki.apache.org/db-derby/UndocumentedDerbyBehavior
Re: Network protocol error in prepareStatement()
Posted by Daniel Noll <da...@nuix.com>.
On Tuesday 13 November 2007 04:22:18 Bryan Pendleton wrote:
> > I'm getting this unusual exception during prepareStatement():
>
> Hi Daniel,
>
> This could possibly be due to a bug in Derby. Can you reproduce
> the problem? If so, can you gather more information? Here is
> a wiki page which provides guidance about how to proceed with
> gathering more information:
>
> http://wiki.apache.org/db-derby/ProtocolDebuggingTips
It apparently does happen every time, whether from remote hosts or localhost.
This is embedded in an application though so changing the connection
properties isn't going to be easy, but do you think changing the system
property derby.drda.debug to true on the server would generate enough output
to diagnose the problem?
Failing that I might have to step our customer through using a third-party
database browsing tool to open the database, but those aren't the easiest to
use and I sort of fear leaving that sort of power in the hands of an end
user.
Daniel
Re: Network protocol error in prepareStatement()
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I'm getting this unusual exception during prepareStatement():
Hi Daniel,
This could possibly be due to a bug in Derby. Can you reproduce
the problem? If so, can you gather more information? Here is
a wiki page which provides guidance about how to proceed with
gathering more information:
http://wiki.apache.org/db-derby/ProtocolDebuggingTips
thanks,
bryan
Re: Network protocol error in prepareStatement()
Posted by Øystein Grøvlen <Oy...@Sun.COM>.
Daniel Noll wrote:
> Hi all.
>
> I'm getting this unusual exception during prepareStatement():
>
> Caused by: org.apache.derby.client.am.DisconnectException: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
> at org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM(Unknown Source)
> at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
> at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
> at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
> at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
> at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
> at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
> at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
> at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
> at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
> at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
>
> The connection is from the host to itself so network issues should hopefully
> be out of the picture. Any idea what causes this error? The derby log is completely
> empty this time (no error messages, no success messages either.)
The call stack indicates that the server has sent and CMDCHKRM command
which I should a reply indicating that the client, as part of the
prepare message, sent something it was not able to understand. I looked
at the Network Server code, and I could not find that it would
necessarily write something if an error happens during prepare,
regardless of what debug flags you might turn on. Hence, I think the
best bet is to turn on tracing on the client and/or serve to see if we
can see something wrong with the message being sent.
--
Øystein