AnsweredAssumed Answered

Class Not found exception java.lang.ClassNotFoundException: com.osisoft.jdbc.Driver

Question asked by kjelavankal on Jan 12, 2015
Latest reply on Jul 19, 2018 by rishkyjohn

Hi All,


I was able to teats a java code that connects to some PI servers and gets data on my PC .


I am now trying to deploy my java code to our test server . I installed the following softwares  on the test server


a) OSI Prerequiste Kit

b) PI OLEDB-Enetrprise software

c) PI sql Data access server



I setup connections to the different PI servers


I was able to connect through PIOLEDBTester.exe and run my queries and get data back from PI servers.


I verified that a class path is setup on the server . It has the value of C:\Program Files\PIPC\JDBC\PIJDBCDriver.jar;.


I added the PIJDBCDriver.jar file to my project library and deployed the  code. I verified that the Driver file is included on my project jar file .


When i run my code on the server i get the following error 


java.lang.ClassNotFoundException: com.osisoft.jdbc.Driver



My code

          String driver = "com.osisoft.jdbc.Driver";

          Properties plist = new Properties();



          System.out.println("DATA COLLECTION: Connect to PI" );


          conn = DriverManager.getConnection(connectionString,plist);

I am getting the error at the line " Class.forName(driver).newInstance();     "


Java Error


java.lang.ClassNotFoundException: com.osisoft.jdbc.Driver

01/12/2015 11:40:37 -  at$

01/12/2015 11:40:37 -  at Method)

01/12/2015 11:40:37 -  at

01/12/2015 11:40:37 -  at java.lang.ClassLoader.loadClass(

01/12/2015 11:40:37 -  at sun.misc.Launcher$AppClassLoader.loadClass(

01/12/2015 11:40:37 -  at java.lang.ClassLoader.loadClass(

01/12/2015 11:40:37 -  at java.lang.Class.forName0(Native Method)

01/12/2015 11:40:37 -  at java.lang.Class.forName(


Any help will be highly appreciated.