-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: ORA-01552 Unable to connect to readonly database
PostPosted: Tue Feb 17, 2009 4:17 pm 
Newbie

Joined: Fri Sep 03, 2004 9:11 am
Posts: 6
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.