HSQLDB, performing cleanup makes the database useless:
(I have a DB to reproduce this)
...
[2008-01-10 11:05:50,345] INFO - jetbrains.buildServer.SERVER - Compacting database...
[2008-01-10 11:05:50,376] INFO - jetbrains.buildServer.SERVER - Cleaning build data from the database ...
[2008-01-10 11:05:52,220] INFO - jetbrains.buildServer.SERVER - Cleaning build data from the database ...
[2008-01-10 11:05:53,579] INFO - jetbrains.buildServer.SERVER - Cleaning build data from the database ...
[2008-01-10 11:05:54,376] INFO - jetbrains.buildServer.SERVER - Cleaning build data from the database ...
[2008-01-10 11:05:55,376] INFO - jetbrains.buildServer.SERVER - Cleaning build data from the database ...
[2008-01-10 11:05:56,064] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.buildTriggers.vcs.clearcase.structure.ClearCaseStructureCache$1
[2008-01-10 11:05:56,064] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.buildTriggers.vcs.clearcase.structure.ClearCaseStructureCache$1 has finished
[2008-01-10 11:05:56,064] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.serverSide.impl.ProjectManagerImpl$5
[2008-01-10 11:05:56,079] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.serverSide.impl.ProjectManagerImpl$5 has finished
[2008-01-10 11:05:56,079] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.serverSide.impl.cleanup.DeletedConfigurationsCleaner
[2008-01-10 11:05:56,079] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.serverSide.impl.cleanup.DeletedConfigurationsCleaner has finished
[2008-01-10 11:05:56,079] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.serverSide.impl.AgentPersistenceFacade$OldAgentsCleaner
[2008-01-10 11:05:56,079] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.serverSide.impl.AgentPersistenceFacade$OldAgentsCleaner has finished
[2008-01-10 11:05:56,079] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.duplicator.DuplicatesGeneralDataCleaner
[2008-01-10 11:05:56,954] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.duplicator.DuplicatesGeneralDataCleaner has finished
[2008-01-10 11:05:56,954] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.serverSide.impl.cleanup.DeleteZombiePersonalChangesFiles
[2008-01-10 11:05:56,970] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.serverSide.impl.cleanup.DeleteZombiePersonalChangesFiles has finished
[2008-01-10 11:05:56,970] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.vcs.impl.VcsManagerImpl$3
[2008-01-10 11:05:56,970] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.vcs.impl.VcsManagerImpl$3 has finished
[2008-01-10 11:05:56,970] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.serverSide.impl.projectSources.PatchCacheImpl
[2008-01-10 11:05:56,985] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.serverSide.impl.projectSources.PatchCacheImpl has finished
[2008-01-10 11:05:56,985] INFO - jetbrains.buildServer.SERVER - Running cleaner jetbrains.buildServer.runner.codeInspection.InspectionGeneralDataCleaner
[2008-01-10 11:05:58,126] INFO - jetbrains.buildServer.SERVER - Cleaner jetbrains.buildServer.runner.codeInspection.InspectionGeneralDataCleaner has finished
[2008-01-10 11:07:20,048] INFO - erver.serverSide.impl.DBFacade - Connection pool configured (org.hsqldb.jdbcDriver, maximum number of connections: 50)
[2008-01-10 11:07:20,048] ERROR - r.serverSide.impl.DatabaseUtil -
java.sql.SQLException: error in script file line: 603341 org.hsqldb.HsqlException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: TEST_INFOS_PK in statement [SHUTDOWN COMPACT]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.execute(Unknown Source)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at jetbrains.buildServer.serverSide.impl.DatabaseShutdownManagerFactory$2.shutdown(DatabaseShutdownManagerFactory.java:29)
at jetbrains.buildServer.serverSide.impl.DBFacade.closeConnections(DBFacade.java:211)
at jetbrains.buildServer.serverSide.impl.DBFacade.compact(DBFacade.java:164)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl.startCleanup(ServerCleanupManagerImpl.java:142)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl$$FastClassByCGLIB$$ba2c8525.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at jetbrains.buildServer.serverSide.impl.auth.TeamCityMethodSecurityInterceptor.invoke(TeamCityMethodSecurityInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:578)
at jetbrains.buildServer.serverSide.impl.cleanup.ServerCleanupManagerImpl$$EnhancerByCGLIB$$8e912654.startCleanup(<generated>)
at jetbrains.buildServer.controllers.admin.cleanup.AdminEditCleanupPoliciesController$4.run(AdminEditCleanupPoliciesController.java:151)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
javax.el.ELException: Error reading 'lastFinished' on type jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$EnhancerByCGLIB$$403af522
at javax.el.BeanELResolver.getValue(BeanELResolver.java:66)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at org.apache.el.parser.AstValue.getValue(AstValue.java:97)
at org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:29)
at org.apache.el.parser.AstNot.getValue(AstNot.java:26)
at org.apache.el.parser.AstOr.getValue(AstOr.java:21)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)
at org.apache.jsp.overview_jsp._jspx_meth_c_005fwhen_005f1(overview_jsp.java:1300)
at org.apache.jsp.overview_jsp._jspx_meth_c_005fchoose_005f1(overview_jsp.java:1270)
at org.apache.jsp.overview_jsp.access$25(overview_jsp.java:1257)
at org.apache.jsp.overview_jsp$overview_jspHelper.invoke5(overview_jsp.java:2076)
at org.apache.jsp.overview_jsp$overview_jspHelper.invoke(overview_jsp.java:2367)
at org.apache.jsp.tag.web.page_tag.doTag(page_tag.java:384)
at org.apache.jsp.overview_jsp._jspService(overview_jsp.java:218)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:239)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1158)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (error in script file line: 603341 org.hsqldb.HsqlException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: TEST_INFOS_PK)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:306)
at jetbrains.buildServer.serverSide.impl.DBFacade._runSql(DBFacade.java:265)
at jetbrains.buildServer.serverSide.impl.DBFacade.runSql(DBFacade.java:256)
at jetbrains.buildServer.serverSide.impl.query.GenericQuery.execute(GenericQuery.java:56)
at jetbrains.buildServer.serverSide.impl.DBBuildHistory.loadLastEntry(DBBuildHistory.java:531)
at jetbrains.buildServer.serverSide.impl.DBBuildHistory.addLastEntryToCaches(DBBuildHistory.java:332)
at jetbrains.buildServer.serverSide.impl.DBBuildHistory.getRecentEntries(DBBuildHistory.java:409)
at jetbrains.buildServer.serverSide.impl.DBBuildHistory.getLastEntryFor(DBBuildHistory.java:520)
at jetbrains.buildServer.serverSide.impl.auth.SecuredBuildHistory.getLastEntryFor(SecuredBuildHistory.java:116)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$LastFinishedCache.getLastFinished(BuildTypeImpl.java:1545)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.getLastFinished(BuildTypeImpl.java:877)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.getLastFinished(BuildTypeImpl.java:52)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$FastClassByCGLIB$$a84db719.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at jetbrains.buildServer.serverSide.impl.auth.TeamCityMethodSecurityInterceptor.invoke(TeamCityMethodSecurityInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:578)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$EnhancerByCGLIB$$403af522.getLastFinished(<generated>)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
... 50 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (error in script file line: 603341 org.hsqldb.HsqlException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: TEST_INFOS_PK)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getConnection(TransactionAwareDataSourceProxy.java:109)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
... 74 more
Caused by: java.sql.SQLException: error in script file line: 603341 org.hsqldb.HsqlException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: TEST_INFOS_PK
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
... 79 more
Issue wasresolved
| Old | New | |
| Yegor Yarko (yaegor) - 9 months ago (06 Feb 2008 14:27) | ||
| Fixed in version | Benares Minor (3.1) | |
| Fixed in version | TeamCity 3.1 (6760) | |
Alexey Gopachenko (neuro159)
9 months ago (06 Feb 2008 14:27)Database is corrupted. It's typically that this will not show unti it's restarted. (it is restarted for compactification on cleanup).