Cannot upgrade to TeamCity 5 build 10380 (with SQL Server 2008 as back-end database)

I know that TeamCity does not support SQL Server 2008 officially, but there are many people use it so please fix. Here is the stack trace:

Server startup failed

Please examine the error below and make corrections in the server configuration.
If you believe this is not configuration problem, please ask for help in    TeamCity support forum.

Error message: java.lang.IllegalArgumentException: Argument 0 for @NotNull parameter of jetbrains/buildServer/serverSide/db/SQLFunctions.create must not be null

Show stacktrace
Trace: java.lang.Exception: java.lang.IllegalArgumentException: Argument 0 for @NotNull parameter of jetbrains/buildServer/serverSide/db/SQLFunctions.create must not be null
     at jetbrains.buildServer.util.SpringExceptionUtil.extractSpringErrorRealInfo(SpringExceptionUtil.java:21)
     at jetbrains.buildServer.util.SpringExceptionUtil.unrollException(SpringExceptionUtil.java:5)
     at jetbrains.spring.web.TeamCityContextLoaderListener.contextInitialized(TeamCityContextLoaderListener.java:3)
     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
     at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
     at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
     at org.apache.catalina.core.StandardService.start(StandardService.java:516)
     at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
     at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'agentTypeManager' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [jetbrains.buildServer.serverSide.agentTypes.AgentTypeDatabaseStorage]: Error creating bean with name 'agentTypeDatabaseStorage' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [jetbrains.buildServer.serverSide.db.SQLFunctions]: Error creating bean with name 'sqlFunctions' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static jetbrains.buildServer.serverSide.db.SQLFunctions jetbrains.buildServer.serverSide.db.SQLFunctionsFactory.createSQLFunctions(jetbrains.buildServer.serverSide.SQLRunnerEx)] threw exception; nested exception is java.lang.IllegalArgumentException: Argument 0 for @NotNull parameter of jetbrains/buildServer/serverSide/db/SQLFunctions.create must not be null
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/C:/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:/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:/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 'sqlFunctions' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.sql.Connection]: No unique bean of type [java.sql.Connection] is defined: Unsatisfied dependency of type [interface java.sql.Connection]: expected at least 1 matching bean
     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:570)
     at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:190)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:923)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:833)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
     at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
     at jetbrains.spring.web.TeamCityContextLoaderListener.contextInitialized(TeamCityContextLoaderListener.java:31)
     ... 24 more


6 comments
Comment actions Permalink

Thank you for the feedback.

I've posted a related issue TW-9498 (http://www.jetbrains.net/tracker/issue/TW-9498), I'll fix it soon.

--
Leonid

0
Comment actions Permalink

Could you please provide me with the driverName and connectionUrl properties that you're using to access MS SQL 2008 from TeamCity?

Thank you,

Leonid

0
Comment actions Permalink

Here it is

driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
connectionUrl=jdbc:sqlserver://localhost:1433;database=TeamCity;user=sa;password=password;

I also found that TeamCity doesn't use connectionProperties.user and connectionProperties.password to connect to SQL Server 2008. I must set user and password in connection string to connect to it.

0
Comment actions Permalink

Thanks.

As of user and password, that is strange: I'm using both mentioned properties and TC process them fine. I have not to specify additional options in the URL property. My properties file for MS SQL 2008 looks:

    driverName=net.sourceforge.jtds.jdbc.Driver
    connectionUrl=jdbc:jtds:sqlserver://<host>:1433:<db>
    connectionProperties.user=<login>
    connectionProperties.password=<password>
          ... (other properties)



May be, the jtds driver uses login and password from URL when at least one parameter (except standard host,port,db) is specified in URL.

--
Leonid

0
Comment actions Permalink

Currently we don't support Microsoft jdbc driver.
I've posted a new issue TW-9560 (http://www.jetbrains.net/tracker/issue/TW-9560) to support it, you can watch/vote for it.

You can try to connect to MS SQL 2008 using jtds driver, as described here: http://www.jetbrains.net/confluence/display/TCD5/Setting+up+an+External+Database#SettingupanExternalDatabase-MicrosoftSQLServer2005

Thanks.

0
Comment actions Permalink

Hi t800t8 (?),

I must set user and password in connection string to connect to it.


Strange. Are you sure of that?

I'm using Microsoft SQL Server JDBC Driver with SQL Server 2008 (x64) on Windows Server 2008 (x64).
The installation file is sqljdbc_2.0.1803.100_enu.exe

My parameters are:

driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
connectionUrl=jdbc:sqlserver://localhost:2854;databaseName=teamcity
connectionProperties.user=AdminTeamCitySQL
connectionProperties.password=XXX


It does rock!

Regards,

Olivier.

0

Please sign in to leave a comment.