Return-Path: X-Original-To: apmail-empire-db-commits-archive@www.apache.org Delivered-To: apmail-empire-db-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A186391DA for ; Mon, 18 Jun 2012 13:54:44 +0000 (UTC) Received: (qmail 68141 invoked by uid 500); 18 Jun 2012 13:54:43 -0000 Delivered-To: apmail-empire-db-commits-archive@empire-db.apache.org Received: (qmail 67726 invoked by uid 500); 18 Jun 2012 13:54:43 -0000 Mailing-List: contact commits-help@empire-db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@empire-db.apache.org Delivered-To: mailing list commits@empire-db.apache.org Received: (qmail 67207 invoked by uid 500); 18 Jun 2012 13:54:43 -0000 Delivered-To: apmail-incubator-empire-db-commits@incubator.apache.org Received: (qmail 67190 invoked by uid 99); 18 Jun 2012 13:54:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 13:54:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id D91D914285F for ; Mon, 18 Jun 2012 13:54:42 +0000 (UTC) Date: Mon, 18 Jun 2012 13:54:42 +0000 (UTC) From: "Jon Frias (JIRA)" To: empire-db-commits@incubator.apache.org Message-ID: <682971365.24870.1340027682891.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (EMPIREDB-147) BLOB datatype under empire 2.3.1-SNAPSHOT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jon Frias created EMPIREDB-147: ---------------------------------- Summary: BLOB datatype under empire 2.3.1-SNAPSHOT Key: EMPIREDB-147 URL: https://issues.apache.org/jira/browse/EMPIREDB-147 Project: Empire-DB Issue Type: Bug Components: Core Affects Versions: empire-db-2.3.1 Environment: windows xp x64, using java 1.6.25, eclipse Id, postgreSQL database Reporter: Jon Frias Fix For: empire-db-2.1.0-incubating Hi all, I am using the version 2.3.1-SNAPSHOT in my code and I found the following bug: I have a datatable with 3 data fields (Integer, String and BLOB). The database is created correctly with different data types, but when I am trying to get the information from the datatable executing commands, the following error is returned: 140 [main] INFO org.apache.empire.exceptions.EmpireException - An Error occured. Message is: The database operation failed. Native error is: Bad value for type long : \x01000100 The code I am using is the following (the BLOB data tye field is called "Information"): /** * Gets the address books. * * @return the address books */ public List getAddressBooks(){ List myABs = new ArrayList(); DBCommand cmd = db.createCommand(); cmd.select(db.ADDRESSBOOK.ADDRESS_BOOK_ID, db.ADDRESSBOOK.LOCATION, db.ADDRESSBOOK.INFORMATION); DBReader reader = new DBReader(); reader.open(cmd, conn); while(reader.moveNext()){ myABs.add(new addressBookBean( reader.getInt(db.ADDRESSBOOK.ADDRESS_BOOK_ID), reader.getString(db.ADDRESSBOOK.LOCATION), (byte[]) reader.getValue(db.ADDRESSBOOK.INFORMATION))); } return myABs; } Thanks a lot for your time and if any further information is required, don't hesitate and let me know. Best Regards, Jon PS: I opened an issue about a bug with the BLOB data type when the sql script is generated for creating the database. the error message was very similar and it was totally fixed. Maybe it can help. The issue is the following: https://issues.apache.org/jira/browse/EMPIREDB-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288425#comment-13288425 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira