ORA-01033: ORACLE initialization or shutdown in progress

Hello,

Today I started my TeamCity server and after a while I noted that I was still unable to login.
Going into the teamcity-server.log I read that it cannot connect to the Oracle database.

The error is:
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress)

and is due to Oracle that was still initializing the database.
It seems that Teamcity tries 2 times and then stops.


[2009-06-25 09:25:16,578]   INFO -   jetbrains.buildServer.SERVER - Starting TeamCity server
[2009-06-25 09:25:28,281]   INFO - dServer.serverSide.ServerPaths - TeamCity data path was read from teamcity.data.path
[2009-06-25 09:25:28,281]   INFO - dServer.serverSide.ServerPaths - TeamCity data directory:C:/Documents and Settings/Adriano Labate/.BuildServer
[2009-06-25 09:25:29,109]   INFO - erver.serverSide.impl.DBFacade - Connection pool configured (oracle.jdbc.driver.OracleDriver, maximum number of connections: 50)
[2009-06-25 09:25:29,109]   INFO - erver.serverSide.impl.DBFacade - Connection pool URL: jdbc:oracle:thin:@v-ciserver:1521:xe
[2009-06-25 09:25:30,281]  ERROR -   jetbrains.buildServer.SERVER - Failed to initialize TeamCity server, due to error (enable debug to see the whole stacktrace):
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionManager' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'buildServer' while setting bean property 'server'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'buildServer' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'dbFacade' while setting bean property 'db'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbFacade' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [jetbrains.buildServer.serverSide.impl.DBFacade]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean


[2009-06-25 09:30:00,869]   INFO -   jetbrains.buildServer.SERVER - Starting TeamCity server
[2009-06-25 09:30:09,416]   INFO - dServer.serverSide.ServerPaths - TeamCity data path was read from teamcity.data.path
[2009-06-25 09:30:09,416]   INFO - dServer.serverSide.ServerPaths - TeamCity data directory:C:/Documents and Settings/Adriano Labate/.BuildServer
[2009-06-25 09:30:09,978]   INFO - erver.serverSide.impl.DBFacade - Connection pool configured (oracle.jdbc.driver.OracleDriver, maximum number of connections: 50)
[2009-06-25 09:30:09,978]   INFO - erver.serverSide.impl.DBFacade - Connection pool URL: jdbc:oracle:thin:@v-ciserver:1521:xe
[2009-06-25 09:30:11,010]  ERROR -   jetbrains.buildServer.SERVER - Failed to initialize TeamCity server, due to error (enable debug to see the whole stacktrace):
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionManager' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'buildServer' while setting bean property 'server'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'buildServer' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'dbFacade' while setting bean property 'db'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbFacade' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [jetbrains.buildServer.serverSide.impl.DBFacade]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/C:/Program%20Files/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean


Did anyone experienced the same issue? And how did you managed that?
Thanks.
Adriano

1 comment
Comment actions Permalink

Adriano,

such problem can occur if TeamCity server started when the database server has not started yet.
Particularly for Oracle, starting of this DBMS server can take a long time if the previous turn-off was abnormal (in this case Oracle performs its automatical recovering procedure at the server starting phase).

Just restart the TeamCity server.

Please, let me know has it solved the problem.


Thanks,
Leonid


P.S. This problem will be solved in TeamCity 5.0.

0

Please sign in to leave a comment.