SQL Exception when doing a build with RC candidate
Hi
We've just upgraded to the latest TeamCity RC candidate and we are getting the following SQL exception when doing a build. We are running SQL server 2005 as back-end. Please help urgently as the team don't want to commit until the CI server is up and running again:
Build 'OnKey5 Version 2 :: Main - Continuous' #779
Started 'Tue Nov 25 07:38:10 CAT 2008' on 'PRODS-BUILD2' by 'Carel Lotz'
Finished 'Tue Nov 25 07:38:11 CAT 2008' with status 'ERROR Failure'
TeamCity URL http://prods-server:7773/viewLog.html?buildId=841&buildTypeId=bt2779
[07:38:10]: bt2
[07:38:10]: Checking for changes
[07:38:11]: jetbrains.buildServer.serverSide.ExecutionException: org.springframework.jdbc.UncategorizedSQLException: Error executing update with params:[1227591491290, 1]; uncategorized SQLException for SQL [UPDATE agent SET LAST_BINDING_TIMESTAMP = ? WHERE ID=?]; SQL state [42S22]; error code [207]; Invalid column name 'LAST_BINDING_TIMESTAMP'.; nested exception is java.sql.SQLException: Invalid column name 'LAST_BINDING_TIMESTAMP'.
jetbrains.buildServer.serverSide.ExecutionException: org.springframework.jdbc.UncategorizedSQLException: Error executing update with params:[1227591491290, 1]; uncategorized SQLException for SQL [UPDATE agent SET LAST_BINDING_TIMESTAMP = ? WHERE ID=?]; SQL state [42S22]; error code [207]; Invalid column name 'LAST_BINDING_TIMESTAMP'.; nested exception is java.sql.SQLException: Invalid column name 'LAST_BINDING_TIMESTAMP'.
at jetbrains.buildServer.serverSide.impl.XmlRpcBasedAgent.runBuild(XmlRpcBasedAgent.java:43)
at jetbrains.buildServer.serverSide.impl.auth.SecuredBuildAgent.runBuild(SecuredBuildAgent.java:4)
at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:14)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.jdbc.UncategorizedSQLException: Error executing update with params:[1227591491290, 1]; uncategorized SQLException for SQL [UPDATE agent SET LAST_BINDING_TIMESTAMP = ? WHERE ID=?]; SQL state [42S22]; error code [207]; Invalid column name 'LAST_BINDING_TIMESTAMP'.; nested exception is java.sql.SQLException: Invalid column name 'LAST_BINDING_TIMESTAMP'.
at jetbrains.buildServer.serverSide.impl.query.GenericQuery.executeUpdate(GenericQuery.java:85)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery$3.run(GenericQuery.java)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery$3.run(GenericQuery.java:2)
at jetbrains.buildServer.serverSide.impl.DBFacade$4.doInConnection(DBFacade.java:1)
at jetbrains.buildServer.serverSide.impl.DBFacade$5.doInConnection(DBFacade.java:2)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
at jetbrains.buildServer.serverSide.impl.DBFacade._runSql(DBFacade.java:113)
at jetbrains.buildServer.serverSide.impl.DBFacade.runSql(DBFacade.java:109)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery.executeUpdate(GenericQuery.java:94)
at jetbrains.buildServer.serverSide.impl.AgentPersistenceFacade.setBindingTimestamp(AgentPersistenceFacade.java:15)
at jetbrains.buildServer.serverSide.impl.AbstractBuildAgent.persistCommunicationTimestamp(AbstractBuildAgent.java:8)
at jetbrains.buildServer.serverSide.impl.AbstractBuildAgent.setCommunicationTimestamp(AbstractBuildAgent.java:60)
at jetbrains.buildServer.serverSide.impl.XmlRpcBasedAgent$AgentTargetProxy.call(XmlRpcBasedAgent.java:14)
at jetbrains.buildServer.serverSide.impl.XmlRpcBasedAgent.runBuild(XmlRpcBasedAgent.java:9)
... 8 more
Caused by: java.sql.SQLException: Invalid column name 'LAST_BINDING_TIMESTAMP'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
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:104)
... 21 more
[07:38:11]: Build finished
Please sign in to leave a comment.
(Bump) Any help on the issue would be greatly appreciated. The TeamCity server logs are full of the same exceptions.
Carel,
It seems that something gone wrong during the upgrade.
Do you have server logs for the first start after upgrade (ont he first start database conversion is performed)? Can you attach them?
Please also include .BuildServer/system/version.dat files: both current and the one before the upgrade.
--
Best regards,
Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
OK Yegor
I've spend the afternoon debugging the upgrade process and I think I've figured out what is going wrong. Here are the steps that I followed to upgrade our server with what I think went wrong:
After again stopping and restarting I was able to get TeamCity to eventually upgrade the database.