empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Frias (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Commented] (EMPIREDB-146) blob data type is not working with postgresql under v2.3
Date Mon, 04 Jun 2012 12:31:23 GMT

    [ https://issues.apache.org/jira/browse/EMPIREDB-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288523#comment-13288523
] 

Jon Frias commented on EMPIREDB-146:
------------------------------------

Hi Francis,

I have tested it using maven and it works fine!

Thank you very much for your help and for fixing the problem so fast.

Best Regards,

Jon
                
> blob data type is not working with postgresql under v2.3
> --------------------------------------------------------
>
>                 Key: EMPIREDB-146
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-146
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: CodeGenerator
>    Affects Versions: empire-db-2.3.0
>         Environment: OS: Windows XP x64
> Programming software: Eclipse
> Database: PostgreSQL
>            Reporter: Jon Frias
>            Assignee: Francis De Brabandere
>              Labels: api-change, features
>             Fix For: empire-db-2.3.1
>
>
> The possible bug I have detected is that, when I am creating a data table, I add a new
DBTableColum which data type is BLOB. The code is compiling with no problem and no warning
appears. However, hen the database is created by the empire-db generated script, the following
error occurs:
>  ERROR org.apache.empire.db.DBSQLScript - 
>  org.postgresql.util.PSQLException: ERROR: type "blob" does not exist
>    Position: 178
>  org.postgresql.util.PSQLException: ERROR: type "blob" does not exist
>    Position: 178
>        at 
>  org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExe
>  cutorImpl.java:2102)
>        at 
>  org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorI
>  mpl.java:1835)
>        at 
>  org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.jav
>  a:257)
>        at 
>  org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2State
>  ment.java:500)
>        at 
>  org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJ
>  dbc2Statement.java:374)
>        at 
>  org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc
>  2Statement.java:302)
>        at 
>  org.apache.empire.db.DBDatabaseDriver.executeSQL(DBDatabaseDriver.java
>  :552)
>        at org.apache.empire.db.DBSQLScript.run(DBSQLScript.java:120)
>        at 
>  com.tecnalia.plantcockpit.orm.testing.database.Database.createDatabase
>  (Database.java:129)
>        at 
>  com.tecnalia.plantcockpit.orm.database.DatabaseTest.createDB(DatabaseT
>  est.java:39)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
>  Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at 
>  org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkM
>  ethod.java:44)
>        at 
>  org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCall
>  able.java:15)
>        at 
>  org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMet
>  hod.java:41)
>        at 
>  org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMeth
>  od.java:20)
>        at 
>  org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.j
>  ava:28)
>        at 
>  org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.jav
>  a:31)
>        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
>        at 
>  org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunn
>  er.java:69)
>        at 
>  org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunn
>  er.java:48)
>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>        at 
>  org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>        at 
>  org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>        at 
>  org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>        at 
>  org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
>        at 
>  org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4T
>  estReference.java:50)
>        at 
>  org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.
>  java:38)
>        at 
>  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote
>  TestRunner.java:467)
>        at 
>  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote
>  TestRunner.java:683)
>        at 
>  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR
>  unner.java:390)
>        at 
>  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest
>  Runner.java:197)
>  344 [main] INFO org.apache.empire.exceptions.EmpireException - An 
>  Error occured. Message is: The database operation failed. Native error 
>  is: ERROR: type "blob" does not exist
>    Position: 178
>  The code of the datatable which include the datatype BLOB in one column is this:
>  public class AddressBook extends DBTable{
>        /** serial id. */
>        private static final long serialVersionUID = 1L;
>        /** The ADDRESS_BOOK_ID. */
>        public final DBTableColumn ADDRESS_BOOK_ID;
>        /** The ADDRES s_ id. */
>        public final DBTableColumn ADDRESS_ID;
>        /** The LOCATION. */
>        public final DBTableColumn LOCATION;
>        public final DBTableColumn INFORMATION;
>        public AddressBook(DBDatabase db) {
>              super("address_book", db);
>              ADDRESS_BOOK_ID = addColumn("address_book_id", 
>  DataType.INTEGER, 0, DataMode.AutoGenerated, 
>  "address_book_address_book_id_seq");
>              ADDRESS_ID = addColumn("address_id", DataType.INTEGER, 0, 
>  DataMode.NotNull);
>              LOCATION = addColumn("location", DataType.CHAR, 60, 
>  DataMode.NotNull);
>              INFORMATION = addColumn("information", DataType.BLOB, 0, 
>  DataMode.NotNull);
>              setPrimaryKey(ADDRESS_ID);
>              addIndex("address_book_pk", true, new DBColumn[] { 
>  ADDRESS_BOOK_ID});
>        }
>  }

--
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

        

Mime
View raw message