Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 86212 invoked from network); 28 Aug 2008 15:53:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Aug 2008 15:53:15 -0000 Received: (qmail 96668 invoked by uid 500); 28 Aug 2008 15:53:13 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 96640 invoked by uid 500); 28 Aug 2008 15:53:12 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 96629 invoked by uid 99); 28 Aug 2008 15:53:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2008 08:53:12 -0700 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2008 15:52:14 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KYjnf-0002J0-Q2 for derby-user@db.apache.org; Thu, 28 Aug 2008 08:52:43 -0700 Message-ID: <19203507.post@talk.nabble.com> Date: Thu, 28 Aug 2008 08:52:43 -0700 (PDT) From: cld71 To: derby-user@db.apache.org Subject: Derby Blob MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cld71@hotmail.com X-Virus-Checked: Checked by ClamAV on apache.org I am uploading a file using apache commons fileupload. I am trying to store the file in a derby blob field. The file is zipped with a pdf file as a zip entry. After uploading the file, then I test the file by downloading it and the downloaded file gives me errors. To test what the problem is, I saved the uploaded file in a temp location using the same methods as loading the blob, and the temp file works find. Here is a code example: ... byte[] data = item. ... SerialBlob sb = new SerialBlob(data); ... PreparedStatement ps = connection.prepareStatment("insert into my_file(file_name, the_file) values(?,?)"); ps.setString(1,file_name); ps.setBlob(2,sb); ps.execute(); -- View this message in context: http://www.nabble.com/Derby-Blob-tp19203507p19203507.html Sent from the Apache Derby Users mailing list archive at Nabble.com.