SQL errors after migrating to Oracle

After migrating our TC server from the build-in database to Oracle, we've been occasionally getting the error below.  This makes builds fail sporadically and when they do they get stuck as failed even if later builds succeed.

Any ideas about how to fix this?

We're using TeamCity        Enterprise Version 4.5.4 (build 9071) and Oracle 10.

Thanks for any help.


org.springframework.jdbc.UncategorizedSQLException: Error executing update with params:[182, 1600]; uncategorized SQLException for SQL [UPDATE build_state SET MODIFICATION_ID = ? WHERE ID = ?]; SQL state [42000]; error code [1722]; ORA-01722: invalid number
; nested exception is java.sql.SQLException: ORA-01722: invalid number

org.springframework.jdbc.UncategorizedSQLException: Error executing update with params:[182, 1600]; uncategorized SQLException for SQL [UPDATE build_state SET MODIFICATION_ID = ? WHERE ID = ?]; SQL state [42000]; error code [1722]; ORA-01722: invalid number
; nested exception is java.sql.SQLException: ORA-01722: invalid number

at jetbrains.buildServer.serverSide.impl.query.GenericQuery.executeUpdate(GenericQuery.java:95)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery$3.run(GenericQuery.java:2)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery$3.run(GenericQuery.java)
at jetbrains.buildServer.serverSide.impl.DBFacade$3.doInConnection(DBFacade.java:1)
at jetbrains.buildServer.serverSide.impl.DBFacade$4.doInConnection(DBFacade.java:2)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
at jetbrains.buildServer.serverSide.impl.DBFacade._runSql(DBFacade.java:27)
at jetbrains.buildServer.serverSide.impl.DBFacade.runSql(DBFacade.java:203)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery.executeUpdate(GenericQuery.java:49)
at jetbrains.buildServer.serverSide.impl.BuildPromotionImpl.persistMaxModificationId(BuildPromotionImpl.java:101)
at jetbrains.buildServer.serverSide.impl.BuildPromotionImpl.persistVcsRelatedData(BuildPromotionImpl.java:326)
at jetbrains.buildServer.serverSide.impl.BuildPromotionImpl.doPersist(BuildPromotionImpl.java:125)
at jetbrains.buildServer.serverSide.impl.BuildPromotionImpl.persist(BuildPromotionImpl.java:71)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$13.processItem(TopBuildDependencyGraphImpl.java:0)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$13.processItem(TopBuildDependencyGraphImpl.java:1)
at jetbrains.buildServer.serverSide.impl.dependency.BuildDependencyGraphImpl.traverseBottomUp(BuildDependencyGraphImpl.java:9)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$5.run(TopBuildDependencyGraphImpl.java:2)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java:1)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:4)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:23)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:61)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.traverseBottomUp(TopBuildDependencyGraphImpl.java:3)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.setRevisionsAndModificationIdToPromotion(TopBuildDependencyGraphImpl.java:49)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.doCollectChanges(TopBuildDependencyGraphImpl.java:45)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.access$000(TopBuildDependencyGraphImpl.java:34)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:2)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java:1)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:4)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:23)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:61)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:31)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:60)
at jetbrains.buildServer.serverSide.impl.BuildChangesCollector.collectChangesForBuild(BuildChangesCollector.java:15)
at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:1)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: ORA-01722: invalid number

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:182)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:630)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1081)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2977)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery.executeUpdate(GenericQuery.java:30)
... 40 more

2 comments
Comment actions Permalink

Nat,

it's a very strange mistake.
How offen such errors occur? Could you please send me more stack traces?
Which version of jdbc driver do you use? Is TeamCity installed on the same computer as the Oracle server, or not?
Which connection URL is specified in the 'database.properties' file? (it is placed in the '<TeamCity_Data>/config' directory)
Could you please attach the 'teamcity-server.log'? (it is placed in the '<TeamCity_Home>/logs' directory)


Thank you.
Leonid

0
Comment actions Permalink

Nat,

I've copied your post into our issue tracker: http://www.jetbrains.net/tracker/issue/TW-9119
You can watch/vote for this issue.

0

Please sign in to leave a comment.