db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael" <mikael-arons...@telia.com>
Subject Re: Problems with BLOBS (fixed....)
Date Fri, 11 Apr 2008 13:54:53 GMT
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" <mikael-aronsson@telia.com>
To: "Derby Discussion" <derby-user@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
> 


Mime
View raw message