java - org.postgresql.Driver not found after install application -
when try open connection postgresql database, add recognize driver:
class.forname("org.postgresql.driver");
when run application netbeans/eclipse, works fine. i'm generating installer using innosetup application. after installation, postgresql.jar added folders, i'm getting error:
org.postgresql.driver java.net.urlclassloader$1.run(unknown source) java.net.urlclassloader$1.run(unknown source) java.security.accesscontroller.doprivileged(native method) java.net.urlclassloader.findclass(unknown source) java.lang.classloader.loadclass(unknown source) sun.misc.launcher$appclassloader.loadclass(unknown source) java.lang.classloader.loadclass(unknown source) java.lang.class.forname0(native method) java.lang.class.forname(unknown source) fourcis.scb.utils.databaseutilities.createdatabaseifnotexists(databaseutilities.java:19) fourcis.scb.threads.threadoperacoesdatabase.run(threadoperacoesdatabase.java:17)
this occuring when i'm installing application. when run ide, it's working properly. guys know be?
thanks!
from error stack, looks classpath error. is trying driver @ runtime , not able find it. can try 1 of following things see if fixes issue
1) set classpath variable include folder containing postgresql.jar
2) if feasible, run java commpand classpath information. way set classpath
Comments
Post a Comment