views:

106

answers:

3

I am using Eclipse Galileo and Tomcat 6.0. I am getting an error like this:

2010-08-17 00:09:42,684,JDBCExceptionReporter,WARN,,SQL Error: 0, SQLState: null
2010-08-17 00:09:42,684,JDBCExceptionReporter,ERROR,,Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
2010-08-17 00:09:42,684,SettingsFactory,WARN,,Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)

I have ojdbc14-9.2.0.8.jar placed in the Tomcat lib folder as well as the deployment folders inside Tomcat webapps folder.

Anyone knows what is causing this?

+1  A: 
ORA-01033: ORACLE initialization or shutdown in progress

This indicates that DB is in process of either startup or shutdown and Connection to this DB can't be established.

Check your database instance is started. If not then call "startup" from sqlplus prompt before you try your program again.

If you use SQLDeveloper ,You can also check do you get connected to database using it.

Few links explaining ora code:

http://ora-01033.ora-code.com/

http://www.dbmotive.com/oracle_error_codes.php?errcode=01033

http://www.orafaq.com/forum/t/38120/2/

YoK
The DB is working fine, I am able to access it using SQLDeveloper.
rishi
@rishi Can you check you are accessing same DB as used by your program ?
YoK
I have added few links for your reference
YoK
A: 

Is this happening on server startup (maybe a deve environment where tomcat and oracle are on the same server) ? Tomcat would generally start up quicker than the database so it could well be trying to connect before the database is ready.

You (or your DBA) should be able to run the following query to show when the database started up. The alert log would be the place to look to determine how long it took to startup. If it was shut down abruptly, it has to apply the redo logs to the datafiles before it can permit other sessions to connect. It then has to rollback any transactions that were uncommitted when it was shutdown, but it can handle other sessions during this phase.

select startup_time from v$instance;

Gary
A: 

I'm not sure what happened, but the issues seem to be gone now. I put all my support jars for all projects into the deployment folder. Not sure if that was related to this or I just got lucky, but I am not getting this error now. :)

rishi