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 "Mikael Aronsson (JIRA)" <ji...@apache.org> on 2007/09/22 21:46:50 UTC

[jira] Created: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
---------------------------------------------------------------------------

                 Key: DERBY-3085
                 URL: https://issues.apache.org/jira/browse/DERBY-3085
             Project: Derby
          Issue Type: Bug
          Components: JDBC, Network Client
    Affects Versions: 10.3.1.4, 10.2.2.0, 10.2.1.6
         Environment: Windows XP SP2
            Reporter: Mikael Aronsson


Java Version:    1.6.0_02
Java Vendor:     Sun Microsystems Inc.
Java home:       C:\Program Files\Java\jre1.6.0_02
Java classpath:  derbytools.jar
OS name:         Windows XP
OS architecture: x86
OS version:      5.1
Java user name:  Ma
Java user home:  C:\Documents and Settings\ma
Java user dir:   c:\tools\derby\lib
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)

The following code fails:
    // Data is a byte[] vector
    ByteArrayInputStream is = new ByteArrayInputStream( data);    
    String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
    PreparedStatement ps = conn.prepareStatement( sql);
    ps.setBinaryStream( 1, is, data.length);
    
    if( ps.executeUpdate() == 0)
    {
        // it throws an exception here if the data array us larger then around 32750 bytes!!!
    }

It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
        at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
        at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)

The table is defined as:
    CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)

It does loook like this only happens with the NetWork client driver, the embedded driver works fine.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3085:
----------------------------------

    Attachment: trace.out.withrow
                trace.out.norows
                TestBlob.java

If there is a row that needs to be updated the update will succeed.  The issue seems to be in the handling of the warning: "No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table"


Attached are 
TestBlob.java  (small java repro)
trace.out.norows (client side trace when there are no rows in the table)
trace.out.withrow(client side trace when there is a row in the table and the program succeeds.)


> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>         Attachments: TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530492 ] 

Kathey Marsden commented on DERBY-3085:
---------------------------------------

I think the problem is not the warning itself.  I changed the embedded code to not add the warning and saw the same protocol error even though the warning was not sent. I tend to think the trouble is that in the even there are no matching rows, The entire stream is not consumed, since it is not needed to update the row. This leaves the DDMReader pointing to the middle of the parameter data when it is ready to read the next DSS.


> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>         Attachments: TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3085:
----------------------------------

    Derby Info: [Patch Available, Regression]  (was: [Regression])

Tests passed except for demo/checkToursDB which I don't think could be related as it is not network server related.

Please review patch derby-3085_diff.txt


> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: derby-3085_diff.txt, derby-3085_stat.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531142 ] 

Bryan Pendleton commented on DERBY-3085:
----------------------------------------

I, too, don't immediately see why this situation only arises with at most a single parameter, so if it's easy to explain, that would help educate me. Thanks!

> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: derby-3085_diff.txt, derby-3085_stat.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "A B (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531116 ] 

A B commented on DERBY-3085:
----------------------------

Hi Kathey,

I don't have much experience in this area of code, but from what I could tell the patch looks good.  The changes are nicely contained and easy to understand, and I verified that the new regression test case fails without the patch and passes with it.

So +1 from me, inexperienced with LOBs though I am...

I did have the following minor comments/suggestions, but none of these is worth blocking the commit of your changes:

1 - Your comment above says "There is only one parameter ever streamed", and a similar comment in the patch says "Only the last parameter with an EXTDTA will be streamed."  It might be nice to have more of a "why" in the code comment, or else a reference to another place that explains this more. As a reader of the patch, that was the first thing I found myself wondering, and I was not able to find an explanation in the (very) brief scanning that I did.

2 - It looks like we drain the buffer 1000 bytes at a time; is that just a randomly chosen number? I'm guessing it is but just thought I'd ask.  If the number itself is not significant, a quick comment saying as much might make it easier for people to change it in the future if needed (for whatever reason).

3 - Is it possible to add a test case where we have multiple stream parameters, just to make sure that things still work in that case, too? Ex. add a second lob column to "testing" table and then a second parameter to the UPDATE statement?

3 - It looks like the regression test added for this issue only tests the case of a "testing" table with no rows.  Would it be worth it (as a sanity check) to also test the situation where there are rows in the table but the UPDATE predicate does not match any of the rows?  I assume that such an UPDATE will behave the same as when there are no rows, but it may be useful to verify.

4 - Looks like there may be some slight spacing inconsistencies within the changed code for DRDAStatement.java.

As I said, all of these comments are minor.  The patch looks good overall.  Thank you for picking this issue up and for resolving it so quickly!

> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: derby-3085_diff.txt, derby-3085_stat.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-3085.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.1.5
                   10.2.2.1
       Derby Info: [Patch Available, Regression]  (was: [Regression, Patch Available])

> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>             Fix For: 10.2.2.1, 10.3.1.5, 10.4.0.0
>
>         Attachments: derby-3085_diff.txt, derby-3085_diff2.txt, derby-3085_stat.txt, derby-3085_stat2.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3085:
----------------------------------

    Attachment: derby-3085_stat2.txt
                derby-3085_diff2.txt

Attached is a revised patch with the changes suggested by Army.  
1) Added commment to preexisting code which only streams last EXTDTA. I hope my understanding of this is correct. In readAndSetAllExtParams we now have.
 // Only the last EXTDTA is streamed.  This is because all of 
 // the parameters have to be set before execution and are 
 // consecutive in the network server stream, so only the last
// one can be streamed.
final boolean doStreamLOB = (streamLOB && i == numExt -1);

- Added tests for multiple parameters, matched updates where the stream is consumed and situation where there is a row inserted but no match 

- Fixed tab/space differences (I think).

- added comments that 1000 byte buffer for draining the stream is just a random selection that doesn't take up too much memory.

I only ran BlobClob4BlobTest as all other changes were cosmetic.

Thanks Army and Bryan for looking at the patch.

Kathey




> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: derby-3085_diff.txt, derby-3085_diff2.txt, derby-3085_stat.txt, derby-3085_stat2.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3085:
----------------------------------

    Derby Info: [Regression]

Looks like this regressed with revision 438478 of DERBY-1559
http://svn.apache.org/viewvc?view=rev&revision=438478




> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "A B (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531177 ] 

A B commented on DERBY-3085:
----------------------------

Thank you for the second patch, Kathey.  The whitespace issues in DRDAStatement are still hanging around near the "do-while" loop, but that's really not a big deal.  (For what it's worth, I usually run the "cat" command on a patch as that seems to show spacing issues pretty clearly: "cat derby-3085_diff2.txt | more").

I have no further review comments to suggest. +1 to commit.

> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: derby-3085_diff.txt, derby-3085_diff2.txt, derby-3085_stat.txt, derby-3085_stat2.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reassigned DERBY-3085:
-------------------------------------

    Assignee: Kathey Marsden

> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3085:
----------------------------------

    Attachment: derby-3085_stat.txt
                derby-3085_diff.txt

Attached is a patch to resolve this issue.  My solution was to store a reference to the stream for the streamed parameter in the DRDAStatement.paramState and then drain the stream after statement execution if needed.  There is only one parameter ever streamed, so only one field needed to be added.  I added a test for both BLOB's and CLOB's to Blob4ClobTest.java.  Tests are running now.


> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>            Assignee: Kathey Marsden
>         Attachments: derby-3085_diff.txt, derby-3085_stat.txt, TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by Kathey Marsden <km...@sbcglobal.net>.
Bryan Pendleton wrote:
>>> I vaguely recall discussions of
>>> such an algorithm during the LOB locator development, so there may
>>> in fact be such code in the client, but it's not working for some
>>> reason or another.
>>
>> Thank you Bryan for looking at this.  Is the LOB locator development 
>> relevant to parameters being sent from the client or only LOBs being 
>> returned from the server?
>
> Hi Kathey,
>
> I did some searching through JIRA and the mailing list, but failed to
> quickly find the discussion that I remembered.
>
> It's quite possible that I was remembering a discussion that occurred
> during the Layer B Streaming project, and that work has I think now
> been supplanted by the locators implementation, so it may no longer
> be relevant.
>
> Still, I think it went something like this:
>
>  - The client has called ResultSet.next(), and has positioned itself
>    to a row containing one or more lobs.
>  - The client has fetched some of the column data, but has not fully
>    retrieved all of the data of (at least one of) the LOBs.
>  - The client then calls next() again to move off of this row and
>    on to the next row.
>
This sounds like a very similar situation but in the case of DERBY-3085 
it is the server that is not consuming the entire stream.

- The client has prepared a statement to update a row with a parameter 
marker.
- The client uses setBinaryStream to set the parameter.
- The server executes the statement but finds no rows to update, so does 
not consume the stream.
- The remnants of the parameter data are left in the network server stream.

One thing I noticed is that the streaming of parameter data only happens 
for the last parameter with EXTDTA. That is why it works with multiple 
parameters when there is a row to update.

There is this code from DRDAConnThread.readAndSetAllExtParams()
        final boolean doStreamLOB = (streamLOB && i == numExt -1);
                        readAndSetExtParam(paramPos,
                                           stmt,
                                           
stmt.getParamDRDAType(paramPos+1),
                                           stmt.getParamLen(paramPos+1),
                                           doStreamLOB);





Re: [jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I did some searching through JIRA and the mailing list, but failed to
> quickly find the discussion that I remembered.

But, of course, as soon as I hit "send" I find it :)

http://www.nabble.com/forum/ViewPost.jtp?post=5308847&framed=y
http://www.nabble.com/forum/ViewPost.jtp?post=1764834&framed=y

thanks,

bryan



Re: [jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by Bryan Pendleton <bp...@amberpoint.com>.
>> I vaguely recall discussions of
>> such an algorithm during the LOB locator development, so there may
>> in fact be such code in the client, but it's not working for some
>> reason or another.
> 
> Thank you Bryan for looking at this.  Is the LOB locator development 
> relevant to parameters being sent from the client or only LOBs being 
> returned from the server?

Hi Kathey,

I did some searching through JIRA and the mailing list, but failed to
quickly find the discussion that I remembered.

It's quite possible that I was remembering a discussion that occurred
during the Layer B Streaming project, and that work has I think now
been supplanted by the locators implementation, so it may no longer
be relevant.

Still, I think it went something like this:

  - The client has called ResultSet.next(), and has positioned itself
    to a row containing one or more lobs.
  - The client has fetched some of the column data, but has not fully
    retrieved all of the data of (at least one of) the LOBs.
  - The client then calls next() again to move off of this row and
    on to the next row.

At this point, there was a time during development where Derby did not
handle this properly, and then some code was put in place to detect
this situation and fully read any un-read LOB data from the row that
we're moving away from, prior to setting up for the next row.

I'll keep trying to track down the details, but hopefully this memory
is helpful and stimulates somebody else's memory of this situation.

thanks,

bryan


Re: [jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by Kathey Marsden <km...@sbcglobal.net>.
Bryan Pendleton wrote:
> I vaguely recall discussions of
> such an algorithm during the LOB locator development, so there may
> in fact be such code in the client, but it's not working for some
> reason or another.

Thank you Bryan for looking at this.  Is the LOB locator development 
relevant to parameters being sent from the client or only LOBs being 
returned from the server?

>
> As I type this in, I realize that I'm fuzzy on whether this
> drain processing would be trigger by the server or by the client.
> Does the server have enough context to know when the client is
> done with one statement and moving on to the next?
>
It needs to be triggered by the server I think. After execution, any 
streams set in the parameters need to be drained, but as I think about 
this more I don't really understand how things would work with multiple 
parameters if  the parameter is only partially read from the network 
server stream.  It does seem to work ok as long as the streams are 
consumed by the server.  (See attached TestBlobMultipleParam.java).

Kathey



Re: [jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by Bryan Pendleton <bp...@amberpoint.com>.
 > pursue a solution where the Network Server tracks the parameter
 > input streams and drains them after execution if they have not
 > been drained by the execution of the statement.  Does that sound
 > like the right approach?

Yes, that sounds plausible to me. I vaguely recall discussions of
such an algorithm during the LOB locator development, so there may
in fact be such code in the client, but it's not working for some
reason or another.

As I type this in, I realize that I'm fuzzy on whether this
drain processing would be trigger by the server or by the client.
Does the server have enough context to know when the client is
done with one statement and moving on to the next?

thanks,

bryan



[jira] Commented: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530547 ] 

Kathey Marsden commented on DERBY-3085:
---------------------------------------

Well, I guess the question now is whether the remaining data in the input stream should be read by embedded or by Network Server.  The javadoc for setBinaryStream says:

Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY  parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.


So I think that it makes it clear that embedded is only obligated to read the stream "as needed", so I think I will pursue a solution where the Network Server tracks the parameter input streams and drains them after execution if they have not been drained by the execution of the statement.  Does that sound like the right approach?



> Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-3085
>                 URL: https://issues.apache.org/jira/browse/DERBY-3085
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
>         Environment: Windows XP SP2
>            Reporter: Mikael Aronsson
>         Attachments: TestBlob.java, trace.out.norows, trace.out.withrow
>
>
> Java Version:    1.6.0_02
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files\Java\jre1.6.0_02
> Java classpath:  derbytools.jar
> OS name:         Windows XP
> OS architecture: x86
> OS version:      5.1
> Java user name:  Ma
> Java user home:  C:\Documents and Settings\ma
> Java user dir:   c:\tools\derby\lib
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794)
> The following code fails:
>     // Data is a byte[] vector
>     ByteArrayInputStream is = new ByteArrayInputStream( data);    
>     String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'";
>     PreparedStatement ps = conn.prepareStatement( sql);
>     ps.setBinaryStream( 1, is, data.length);
>     
>     if( ps.executeUpdate() == 0)
>     {
>         // it throws an exception here if the data array us larger then around 32750 bytes!!!
>     }
> It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this:
> java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected.  Reason: 0x0. Plaintext connection attempt to an SSL enabled server?
>         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
> The table is defined as:
>     CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL)
> It does loook like this only happens with the NetWork client driver, the embedded driver works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.