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 Mikael <mi...@telia.com> on 2008/04/11 15:54:53 UTC

Re: Problems with BLOBS (fixed....)

Sorry about that, my head was in Mississippi or something, I managed to
use an old Derby jar file so I was not running the correct version, sorry.

Mikael

----- Original Message ----- 
From: "Mikael" <mi...@telia.com>
To: "Derby Discussion" <de...@db.apache.org>
Sent: Friday, April 11, 2008 3:44 PM
Subject: Problems with BLOBS


> Hi !
>
> About a year ago I ahd som problems with BLOBS in Derby because of bugs, I 
> gave up at that time but I thought I kight give it another try and see if 
> it works any better today, but no luck at all so far, there was some very 
> helpful people here trying to fix it and as far as I remember the problem 
> wad found... ?
>
> I am trying to put a 56721 byte file into a record with a BLOB field (16M 
> limit).
>
>    byte[] data = <an array of 56721 bytes from a file.>
>    ByteArrayInputStream is = new ByteArrayInputStream( data);
>    String sql = "UPDATE USF.FileSystem SET FTimeSrc='" + fdateFile + 
> "',FTime='" + fdate + "',FContents=? WHERE FName='" + name + "'";
>    PreparedStatement ps = conn.prepareStatement( sql);
>    ps.setBinaryStream( 1, is, data.length);
>
>    if( ps.executeUpdate() == 0) // Check if record already exists, if not 
> do an INSERT
>    {
>    }
>
> But it crashes at the ps.executeUpdate call (it works fine with smaller 
> files though).
> -----------------------------------------------------------------------------------------
> org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because 
> of a Distributed Protocol Error:  DRDA_Proto_SYNTAXRM; CODPNT arg  = 0; 
> Error Code Value = 3. Plaintext connection attempt from an SSL enabled 
> client?
>        at org.apache.derby.impl.drda.DRDAConnThread.throwSyntaxrm(Unknown 
> Source)
>        at org.apache.derby.impl.drda.DDMReader.readDssHeader(Unknown 
> Source)
>        at 
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
>        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because 
> of a Distributed Protocol Error:  DRDA_Proto_SYNTAXRM; CODPNT arg  = 0; 
> Error Code Value = 3. Plaintext connection attempt from an SSL enabled 
> client?
>        at org.apache.derby.impl.drda.DRDAConnThread.throwSyntaxrm(Unknown 
> Source)
>        at org.apache.derby.impl.drda.DDMReader.readDssHeader(Unknown 
> Source)
>        at 
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
>        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> -----------------------------------------------------------------------------------------
>
> The table I am using look's like this:
>   "CREATE TABLE USF.FileSystem (\n" +
>     "FTime     timestamp NOT NULL,\n" +      // Date for uploading
>     "FTimeSrc  timestamp NOT NULL,\n" +      // Time stamp for original 
> file
>     "FContents BLOB(16M) NOT NULL,\n" +      // The contents of the file
>     "FName     varchar(300) NOT NULL)";      // Name of file
>
> Any ideas why this isn't working ?
>
> My original problem was as follows:
> ------------------------------------
> [ 
> 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
>
> Not sure if this is related to the problem this time though.... but the 
> exceptions look about the same.
>
> Mikael
> 


Re: Problems with BLOBS (fixed....)

Posted by Mikael <mi...@telia.com>.
I'm using 10.3.2.1 and it works just fine.

----- Original Message ----- 
From: <Dy...@Sun.COM>
To: "Derby Discussion" <de...@db.apache.org>
Sent: Friday, April 11, 2008 4:42 PM
Subject: Re: Problems with BLOBS (fixed....)


> Mikael <mi...@telia.com> writes:
>
>> Sorry about that, my head was in Mississippi or something, I managed to
>> use an old Derby jar file so I was not running the correct version, 
>> sorry.
>
> So which version of Derby are you testing with now? DERBY-3085 has been
> fixed and should be available in the 10.3.2.1 release (as well as in the
> upcoming 10.4 release).
>
> -- 
> dt 


Re: Problems with BLOBS (fixed....)

Posted by Dy...@Sun.COM.
Mikael <mi...@telia.com> writes:

> Sorry about that, my head was in Mississippi or something, I managed to
> use an old Derby jar file so I was not running the correct version, sorry.

So which version of Derby are you testing with now? DERBY-3085 has been
fixed and should be available in the 10.3.2.1 release (as well as in the
upcoming 10.4 release).

-- 
dt