cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

SQL Server Configuration

victorgan
1-Newbie

SQL Server Configuration

Hello,

I'm having trouble connecting to a SQL Server Database (SQL Server 2008 R2, mix-mode authentication). Using the following JDBC Driver Class Name (com.microsoft.sqlserver.jdbc.SQLServerDriver) returns the following error when I attempt to create a service and selecting SQL(Query)->Tables/Columns :

"Thing State is being set to ERROR because it failed during the initialization phase: JDBC Driver Class Not Found: com.microsoft.sqlserver.jdbc.SQLServerDriver".

My configuration settings are the following:

    • JDBC Connection String: jdbc:sqlserver://localhost;databaseName=TestDB
    • Database username and password set.

The Thing's Thing Template is set to "Database".

Per a posting I read, it stated sqljdbc4.jar would be located in the Thingworx\WEB-INF\lib folder, though I did not see it there. I then downloaded the sqljdbc4.jar from the Microsoft site and added it in myself. However this did not solve the error message I am getting.

Have I missed a step or are my configuration settings not correct? Any help would be appreciated.

5 REPLIES 5
adam11
5-Regular Member
(To:victorgan)

Hi Victor,

Did you restart your Tomcat server after making these changes?

Hi Adam,

I had thought I did that, but decided to do it again per your comment. It worked this time, thanks a lot, really appreciate it!

Hi Adam,

What I'm running into now is attempting to Execute Query. When I run it, it throws an error: "Unable to Invoke Service RetrieveAll on ConnectSQL : Could not execute service after making (2) attempts"

    • Output: Infotable, no datashape defined yet.

I know I have a connection since I am able to see my tables/columns now, though the application logs throw a warning "NOT CONNECTED, entering retry phase for . Any thoughts?

Thanks

adam11
5-Regular Member
(To:victorgan)

Victor,

What is the value of connectionValidationString?

Hi Adam,

Thanks for the direction, that's what I needed. Had the value as NOW() and changed it to GETDATE(),  it now shows me my result set.

Thanks again!

Top Tags