AnsweredAssumed Answered

Not able to connect with jdbc

Question asked by larsoleruben on Nov 27, 2015
Latest reply on Dec 1, 2015 by larsoleruben

Hi

I am trying to use the JBDC driver to connect to PI. I keep on getting this exception when trying from the getSnap sample:

java.sql.SQLException: Could not connect using none of the specified protocols.

        at com.osisoft.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:148)

        at com.osisoft.jdbc.DriverExtension.connect(DriverExtension.java:211)

        at com.osisoft.jdbc.Driver.connect(Driver.java:272)

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

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

        at getSnap.main(getSnap.java:30)

 

PI SQL Commander and Commander Lite works fine with the same SQL DAS?

Any ideas?

 

Use the enclosed source code and set debug level higher. This error is due to a conflict between the jbdc driver and sql das server.

But that did not solve it completely. I had to change the code for the sql driver as follows:

plist.put("TrustedConnection", "true");

 

What does that exactly mean?

 

 

 

 

regards

Lars

Outcomes