Can not handle the type of Byte[] and Blob when using PostgreSQL
----------------------------------------------------------------

                 Key: DDLUTILS-272
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-272
             Project: DdlUtils
          Issue Type: Bug
          Components: Core (No specific database)
    Affects Versions: 1.0
            Reporter: Sean Xiong
            Assignee: Thomas Dudziak


DDLUTILS Can not handle the type of Byte[] and Blob when using PostgreSQL.

Exception message with my code:

org.apache.ddlutils.DatabaseOperationException: Error while inserting into the 
database: Large Objects may not be used in auto-commit mode.
at 
org.apache.ddlutils.platform.PlatformImplBase.insert(PlatformImplBase.java:1305)
at coredb.database.DatabaseConnection.create(DatabaseConnection.java:295)
at 
coredb.controller.EntityControllerBase.createEntity(EntityControllerBase.java:105)
at entities.core.gen.EntityBaseGen.Save(EntityBaseGen.java:131)
at test.PresentationTests.populatePresentations(PresentationTests.java:222)
at test.PresentationTests.setUp(PresentationTests.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at junit.textui.TestRunner.run(TestRunner.java:77)
at CoreDBTest.main(CoreDBTest.java:44)
Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in 
auto-commit mode.
at 
org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:241)
at 
org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:228)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.setBlob(AbstractJdbc2Statement.java:2851)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1762)
at 
org.postgresql.jdbc3g.AbstractJdbc3gStatement.setObject(AbstractJdbc3gStatement.java:37)
at 
org.postgresql.jdbc4.AbstractJdbc4Statement.setObject(AbstractJdbc4Statement.java:46)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1691)
at 
org.postgresql.jdbc3.AbstractJdbc3Statement.setObject(AbstractJdbc3Statement.java:1483)
at 
org.postgresql.jdbc3g.AbstractJdbc3gStatement.setObject(AbstractJdbc3gStatement.java:47)
at 
org.postgresql.jdbc4.AbstractJdbc4Statement.setObject(AbstractJdbc4Statement.java:69)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1724)
at 
org.apache.ddlutils.platform.PlatformImplBase.setStatementParameterValue(PlatformImplBase.java:2067)
at 
org.apache.ddlutils.platform.PlatformImplBase.setObject(PlatformImplBase.java:2004)
at 
org.apache.ddlutils.platform.postgresql.PostgreSqlPlatform.setObject(PostgreSqlPlatform.java:240)
at 
org.apache.ddlutils.platform.PlatformImplBase.insert(PlatformImplBase.java:1289)
... 21 more 

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

        

Reply via email to