Announcement Announcement Module
Collapse
No announcement yet.
Persist a BLOB column into Oracle v8.1. SQL Error: 17410, SQLState: null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Persist a BLOB column into Oracle v8.1. SQL Error: 17410, SQLState: null

    Hello,

    You might remember me from such posts as Insert TIFF as BLOB in Oracle fails...

    I've updated to Hibernate 4, but the problem remains. Now with: SQL Error: 17410, SQLState: null

    Does anyone know what's wrong here?

    Thanks.

    Entity:

    Code:
    @RooJavaBean
    @RooToString
    @RooJpaActiveRecord(identifierColumn = "ID_IMAGEN", table = "T_IMAGEN", versionField = "")
    public class Imagen {
    
    //...
    
        @NotNull
        @Column(name = "IMAGEN")
        @Lob
        @Basic(fetch = FetchType.LAZY)
        private byte[] image;
    
        @Column(name = "TIPO_MIME")
        @Size(max = 50)
        private String mimeType;
    
        @Column(name = "NUMERO_PAGINAS")
        @Max(99L)
        private Integer pagesNumber;
    
    //...
    Being the column:

    Code:
    Data Type:2004
    Type Name:BLOB
    Column Size:4000
    Octet Length:4000
    Nullable:YES
    Environment:
    Oracle v8.1
    Windows 7 32
    Roo 1.2.1
    Hibernate 4
    Spring 3.1.0.RELEASE
    Java 6 (1.6.0_23)

    Besides, it also fails when trying to rollback the transaction.

    Maybe DBCP can't manage the connection, but I don't know why. The rest of the tests work well.

    Datasource configuration (the one created by Roo)

    Code:
        <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource">
            <property name="driverClassName" value="${database.driverClassName}"/>
            <property name="url" value="${database.url}"/>
            <property name="username" value="${database.username}"/>
            <property name="password" value="${database.password}"/>
            <property name="testOnBorrow" value="true"/>
            <property name="testOnReturn" value="true"/>
            <property name="testWhileIdle" value="true"/>
            <property name="timeBetweenEvictionRunsMillis" value="1800000"/>
            <property name="numTestsPerEvictionRun" value="3"/>
            <property name="minEvictableIdleTimeMillis" value="1800000"/>
            <property name="validationQuery" value="SELECT 1 FROM DUAL"/>
        </bean>
    Stack trace for the error:

    org.hibernate.SQL - insert into T_IMAGEN(IMAGE, TIPO_MIME, NUMERO_PAGINAS) values (?, ?, ?)
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper - No hay más datos para leer del socket [n/a]
    java.sql.SQLException: No hay más datos para leer del socket
    ...
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.j ava:1160)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine. java:963)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine. java:893)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:369)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol .java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TT C7Protocol.java:1093)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery (OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther( OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.execute Update(OraclePreparedStatement.java:589)
    at org.apache.commons.dbcp.DelegatingPreparedStatemen t.executeUpdate(DelegatingPreparedStatement.java:1 05)
    at org.apache.commons.dbcp.DelegatingPreparedStatemen t.executeUpdate(DelegatingPreparedStatement.java:1 05)
    ...
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 17410, SQLState: null
    Stack trace for the error while tryin gto rollback:

    org.hibernate.engine.transaction.spi.AbstractTrans actionImpl - rolling back
    org.hibernate.engine.transaction.internal.jdbc.Jdb cTransaction - re-enabling autocommit
    org.hibernate.engine.transaction.internal.jdbc.Jdb cTransaction - Could not toggle autocommit
    java.sql.SQLException: No hay más datos para leer del socket
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)

    ...

    org.springframework.test.context.TestContextManage r - Caught exception while allowing TestExecutionListener [org.springframework.test.context.transaction.Trans actionalTestExecutionListener@1d41318] to process 'after' execution for test: method [public void com.malsolo.images.core.ImagenIntegrationTest.test Persist() throws java.io.IOException], instance [com.malsolo.images.ImagenEscanerPlainIntegrationTe st@1f14ceb], exception [org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: No hay más datos para leer del socket; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: No hay más datos para leer del socket]
    org.springframework.transaction.TransactionSystemE xception: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking
    at org.springframework.orm.jpa.JpaTransactionManager. doRollback(JpaTransactionManager.java:543)
    Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking
    at org.hibernate.ejb.TransactionImpl.rollback(Transac tionImpl.java:109)
    at org.springframework.orm.jpa.JpaTransactionManager. doRollback(JpaTransactionManager.java:539)
    ... 25 more
    Caused by: org.hibernate.TransactionException: rollback failed
    at org.hibernate.engine.transaction.spi.AbstractTrans actionImpl.rollback(AbstractTransactionImpl.java:2 15)
    at org.hibernate.ejb.TransactionImpl.rollback(Transac tionImpl.java:106)
    ... 26 more
    Caused by: org.hibernate.TransactionException: unable to rollback against JDBC connection
    at org.hibernate.engine.transaction.internal.jdbc.Jdb cTransaction.doRollback(JdbcTransaction.java:167)
    at org.hibernate.engine.transaction.spi.AbstractTrans actionImpl.rollback(AbstractTransactionImpl.java:2 09)
    ... 27 more
    Caused by: java.sql.SQLException: No hay más datos para leer del socket
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.j ava:1160)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine. java:963)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine. java:893)
    at oracle.jdbc.ttc7.Ocommoncall.receive(Ocommoncall.j ava:104)
    at oracle.jdbc.ttc7.TTC7Protocol.rollback(TTC7Protoco l.java:487)
    at oracle.jdbc.driver.OracleConnection.rollback(Oracl eConnection.java:1376)
    at org.apache.commons.dbcp.DelegatingConnection.rollb ack(DelegatingConnection.java:368)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuar dConnectionWrapper.rollback(PoolingDataSource.java :323)
    at org.hibernate.engine.transaction.internal.jdbc.Jdb cTransaction.doRollback(JdbcTransaction.java:163)
    ... 28 more
Working...
X