[ http://issues.apache.org/jira/browse/DERBY-374?page=all ]

Deepa Remesh updated DERBY-374:
-------------------------------

    Attachment: derby374_test_changes.diff

The attached patch "derby374_test_changes.diff" removes client URLs, which 
behave differently on Windows and non-Windows systems, from the test 
jdbcapi/checkDriver.java. 

svn status output:
M      
java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\checkDriver.java
M      
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\checkDriver.out

I ran the test checkDriver.java with DerbyNetClient framework on Windows. I 
don't have access to any non-windows machine. I would appreciate if someone can 
run this test on a non-windows machine to confirm. The patch for DERBY-374 was 
merged to 10.1 branch also. So please commit this test change to trunk as well 
as 10.1 branch.

The test for DERBY-374 has to cover a case where the embedded driver returns a 
null connection to network server. This is still being covered by the test. For 
the removed client urls, I am thinking of some way they can be added back to 
the test.

> Invalid URL with Derby Client when connecting to Network Server causes 
> protocol exception.
> ------------------------------------------------------------------------------------------
>
>          Key: DERBY-374
>          URL: http://issues.apache.org/jira/browse/DERBY-374
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0, 10.1.1.0
>  Environment: Network Server running with Derby client on Windows 2000.
>     Reporter: A B
>     Assignee: Deepa Remesh
>      Fix For: 10.2.0.0
>  Attachments: derby-374-patch.diff, derby-374-patch.status, 
> derby374_test_changes.diff
>
> If using the Derby Client to connect to the Derby Network Server, there are 
> some cases where an invalid URL will cause a protocol exception instead of 
> throwing a proper error.  The two cases I've found are as follow:
> 1) Use of a colon to separate attributes:
> When connecting to the server with JCC, a colon is required to demarcate the 
> Derby attributes from the JCC attributes. For the Derby Client, however, the 
> colon is not a valid part of the URL, so use of it should return an error.  
> However, the result is a protocol exception:
> ij> connect 
> 'jdbc:derby://localhost:1528/sample:user=someUsr;password=somePwd';
> agentThread[DRDAConnThread_9,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
> 2) Use of double-quotes to specify a full path to a database.
> The use of double-quotes around a database path is required when connecting 
> to the server with JCC, but should be optional when using the Derby Client.  
> However,  attempts to use the double-quotes doesn't work--on the contrary, it 
> throws a protocol exception:
> ij> connect 'jdbc:derby://localhost:1528/"C:/myDBs/sample"';
> agentThread[DRDAConnThread_11,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
> Without quotes, the above example will work as expected.
> I'm not sure if the problem is with the Derby client or the Network Server 
> (more investigation required).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to