Error Using MS SQL 2005 with New TeamCity Install. Any Ideas?

I have followed the instructions in the documentation to setup MS SQL 2005 for storage with TeamCity, however when i restart the web server and goto the TeamCity login i get the error below. Ive attached zipped up log files i found from the C:\TeamCity\logs folder if that helps. Any one else having this problem? Once again i've spent some time trying to get this to work to no avail. I dont want to start using TeamCity until i get this solved as the db migration task seems even more complicated and i dont want to lose any data.

Regards
Devman81


HTTP Status 404 -


type Status report
message
description The requested resource () is not available.


Apache Tomcat/6.0.18





Attachment(s):
logs.zip
11 comments
Comment actions Permalink

Are you sure you've copied driver to the WEB-INF/lib directory?

0
Comment actions Permalink

I copied jtds-1.2.2.jar into that directory <see attached>



Attachment(s):
driver.jpg
0
Comment actions Permalink

All seems to be correct. Is it possible that driver jar file is broken? Can you try to download it again?

0
Comment actions Permalink

The JDBC URL in the log file is for the Micrsoft JDBC driver, for jTDS the URL should be in the following format

jdbc:jtds:<server_type>://<server>[:<port>][/<database>][;<property>=<value>[;...]]

There's more details at the following link http://jtds.sourceforge.net/faq.html#urlFormat

Rod

0
Comment actions Permalink

What does your database.properties file look like? Can you please post that one.

I had some issues setting mine up correctly due to the fact that we have several database instances running on the same database server. For instance my connection string would be mysqlserver\development, but the JDBC URL would not accept the slash.
My solution was to find the port number for the database instance, and use that (mysqlserver:<active port>)

Olav

0
Comment actions Permalink

Attached is my database.properties file from the .BuildServer\config folder.

I tried downloading the driver again, but still no joy! Any other suggestions?

Regards
Devman81



Attachment(s):
database.properties
0
Comment actions Permalink

David,

Can you please attach the logs corresponding to the database.properties file attached?

It seems that you corrected  the properties since attaching the logs:

The error in the log initially attached is:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'net.sourceforge.jtds.jdbc.Driver' for connect URL 'jdbc:sqlserver://proximadev:1433/teamcity'

While your database.properties attached later have: connectionUrl=jdbc:jtds:sqlserver://proximadev:1433/teamcity

--
Best regards,

Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thanks for the quick reply Yegor !!

Sorry about that i had tweeked the file in response to other peoples' suggestions. Please see attached zip  for logs corresponding to the database.properties file in my last post.



Attachment(s):
logs.zip
0
Comment actions Permalink

David,

This time the error is Cannot create PoolableConnectionFactory (I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.)

Please try to specify username and password in database.properties file, like:

connectionProperties.password=<password>



It seems that in order to use NT authentication you need to put native libraries form jtds driver into <TeamCIty home>\bin

0
Comment actions Permalink

Finally we're up and running!!!!

I placed the suitably named ntmauth.dll from the jtds driver download into the C:\TeamCity\Bin directory and hey presto, it works!

Its definately worth updating the 4.x online documentation to mention this if you are wanting to use NT authentication.

As as a newbie ive spent a few hours on this and would have never figured this out for myself.

Many thanks for the support!

Devman81

0
Comment actions Permalink

Hi All,

I had gotten stuck on this subject as well.  In addition to the steps above I had to enable TCP/IP using the SQL Server Configuration Manager tool.

Cheers,

James,.

0

Please sign in to leave a comment.