Hi,
there is something you could possibly help me with. I am unable to open an hibernate database connection to a read only database. The information follows:
Hibernate version:
3.2.6.ga
Code between sessionFactory.openSession() and session.close():
Code:
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.use_sql_comments">true</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
<prop key="hibernate.jdbc.use_streams_for_binary">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
<prop key="hibernate.connection.autocommit">false</prop>
</props>
Full stack trace of any exception that occurs:2009-02-17 14:58:35,137 DEBUG SessionFactoryUtils:333 - Opening Hibernate Session
AbandonedObjectPool is used (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@1fd5730)
LogAbandoned: true
RemoveAbandoned: true
RemoveAbandonedTimeout: 300
2009-02-17 14:58:35,976 WARN JDBCExceptionReporter:77 - SQL Error: 0, SQLState: null
2009-02-17 14:58:35,978 ERROR JDBCExceptionReporter:78 - Cannot create PoolableConnectionFactory (ORA-00604: error occurred at recursive SQL level 1
ORA-01552: cannot use system rollback segment for non-system tablespace 'DATA01'
ORA-06512: at line 19
Name and version of the database you are using:Oracle 9i Enterprise Edition Release 9.2.0.6.0 - 64 bit production
========================
Please not that this works, though:
Code:
public void testConn()
{ //v3.0
try
{
String driver = "oracle.jdbc.driver.OracleDriver";
String url = "jdbc:oracle:thin:@host:port:sid";
String username = "username";
String password = "pwd";
Class.forName(driver);
java.sql.Connection conn = java.sql.DriverManager.getConnection(url, username, password);
_logger.debug(conn);
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("SELECT count(*) FROM table1");
if (rs.next())
{
int count = rs.getInt("count(*)");
_logger.debug(count);
}
rs.close();
st.close();
conn.close();
}
catch (Exception ex)
{
_logger.error(ex.getMessage());
}
}
Could anyone point out what how can I configure hibernate to connect to a read only database, please?
Thank you very much in advance...