db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: [jira] Updated: (DERBY-374) Invalid URL with Derby Client when connecting to Network Server causes protocol exception.
Date Mon, 19 Sep 2005 19:33:49 GMT
Army wrote:

> Hi Deepa,
> The think the patch now handles the case of double-quotes correctly,
> but I'm wondering if we need to worry about single quotes, as well?  I
> tried some examples in embedded vs server mode (after applying your
> patch) and here's what I noticed:
> // Embedded.
> ij> connect 'jdbc:derby:''good_1'';create=true';
> <connection successful>
> ij> connect 'jdbc:derby:''C:/my/db/path/bad'';create=true';
> ERROR 08001: No suitable driver
> // Network Server w/ Derby client.
> ij> connect 'jdbc:derby://localhost:1527/''good_3'';create=true';
> <connection successful>
> ij> connect
> 'jdbc:derby://localhost:1527/''C:/my/db/path/bad'';create=true';
> agentThread[DRDAConnThread_8,5,main]
> ERROR (no SQLState): A communication error has been detected.
> Communication protocol being used: Reply.fill(). Communication API
> being used: InputStream.read(). Location where the error was detected:
> insufficient data. Communication function detecting the error: *.
> Protocol specific error codes(s) TCP/IP SOCKETS
> I don't think we can just add a check for single quotes like you did
> for double quotes because that would mean that cases where a pathless
> database name is given in single quotes--a situation that currently
> works--would then fail, which I think would technically be a
> regression.  So you might have to add logic to allow single quotes
> around a pathless database name, but to disallow them (with a syntax
> error) if an actual path is specified...?
> I haven't tried any of this on a non-Windows machine, so I don't know
> if the results are different there.
Regardless of what checking the client needs to do to ensure the URL
format is correct, I wonder if there is not a problem on the server side
with the ACCRDB response.  The server should return an RDBAFLRM (RDB
Access Failed Reply Message) and from the error we are getting on the
client I wonder if that is indeed the case.  Deepa, could you set the
traceFile and see what response we are getting from the server in these
cases where we are getting protocol errors.    The trace files a a
little tricky to read if you aren't used to them so feel free to attach
in your response  or we can talk on IRC.  Relevant sections of the
manuals are Figure 4-2 in the DRDA manual and ACCRDB and RDBAFLRM in the
DDM manual.


View raw message