powered by Jive Software

Custom database problems with SQL Server 2008 R2

I have installed OpenFire 3.7.1 on my machine and configured it to use a custom database connection to use the users I have in an existing database. I did this on a Windows 7 x64 box and after a bit of manipulation was able to successfully connect and authenticate a Spark client with a username in my existing database.

I am now trying to do the same thing on the Windows Server 2008 box that our development team uses. It too is running SQL Server 2008 R2.

Following is the jdbcProvider.connectionString I am using (this same string works on my personal machine with the only difference being I used

localhost instead of the server name. I initially tried to connect a Spark client from my machine to the development server. After many tries and this not working I install Spark on the server and attempted to connect locally just as I did on my machine.

jdbc:jtds:sqlserver://xxx.xxx.x.x:1433/databasename=TestUsers;user=suser;passwor d=securepassword

I’ve tried using the server IP address (as above), the servername (testserver), the database server (testdbserver). I’ve gotten a variety of errors depending on what config string, user I used. With the above string I get “Can’t connect to server: invalid name or server not reachable” with nothing in the \logs\error file with a valid user name/password and server = testdbserver. When I use the actual server name (testserver) I get the following error: “invalid username or password” . This attempt writes the following to the error logs:

org.jivesoftware.openfire.auth.JDBCAuthProvider - Exception in JDBCAuthProvider

java.sql.SQLException: Login failed for user ‘suser’.

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.login(TdsCore.java:602)

at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:344)

at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)

at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source) etc…

I hope this isn’t confusing but basically wonder why the exact same configuring (except for names) works on my Windows 7 machine but does not work on my Server 2008 box. All the values in the dbo.ofProperty tables are the same on both machines (except for the server names - DB names are exactly the same).

Thanks for any help or insight anyone can provide.