0

Recently got this following error in my application JPA/Hibernate with database Oracle RAC 11g.

This error occurred when our storage was full and DBA needed close connections, kill active sessions, or some like this "Connection closed" (now I can know what happened, he was fired....)

javax.persistence.RollbackException: Error while commiting the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:71)
at com.cgmp.ValePedagioSite.comprarViagemPorPlaca(ValePedagioSite.java:473)
at sun.reflect.GeneratedMethodAccessor1719.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
        (...)
Caused by: org.hibernate.exception.JDBCConnectionException: could not insert: [com.cgmp.model.entity.PedagioPracaViagem]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:97)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2295)
        (...)
Caused by: java.sql.SQLRecoverableException: Connection closed
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3331)
at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:47)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3232)
at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:47)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
        (...)

Others entities was inserted without problem...

--- EDITED ---

More informations

Configuration c3p0

<Resource auth="Container"
description=""
driverClass="oracle.jdbc.driver.OracleDriver"
acquireIncrement="1"
initialPoolSize="5"
maxPoolSize="300"
minPoolSize="5"
maxIdleTime="600"
maxIdleTimeExcessConnections="300"
unreturnedConnectionTimeout="900"
numHelperThreads="20"
name=""
user=""
password=" "
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
jdbcUrl="jdbc:oracle:oci:" />

Talking with other DBA he said that one instance from Oracle got full disk, and the registers partial commiteds was created in this moment, but he just deleted trace files, didn't stop db and not killed any session.

dobau
  • 13
  • 7

1 Answers1

1

Well there is not enough information to say for certain, but it sounds like what you are seeing it non-completed transaction handling. The JDBC spec is silently on the issue of what should happen in the case of non-completed transactions. Oracle is the only vendor I know of that decided the best course of action was to commit the work in that situation.

Steve Ebersole
  • 9,339
  • 2
  • 48
  • 46