I am facing a problem in adding the dependency [jar file] of PostGreSQL. I am using the normal JDBC connection to add the data which I get after processing the tagArrived() and tagDeparted() methods.
And in order to add the data inside the database I use this simple code :-
Code: Select all
public Boolean openConnection() {
Boolean result = true;
try {
Class.forName("org.postgresql.Driver");
pgsqlConnection = DriverManager.getConnection(connString, "postgres", "");
} catch (Exception e) {
result = false;
e.printStackTrace();
}
System.out.println("Connection Open Result :- " + result);
return result;
}
Now I am and I should always get the error that ClassNotFound for Class.forName("org.postgresql.Driver"); as I dont know how and where to add the jar file.
My second question is, once you guide me how to add the dependency I would also like to know that when we export the bundle [plugin folder which gets generated] and we deploy it inside the Edge Server how will the jar of PostGreSQL be added. ?
Please help me out.
Thanks
umangsamani