java - oracle.jdbc.OracleDriver on linux -


i created .jar file on eclipse installation (windows10) , need export linux server execute java program.

the .jar has ben built ant, specified 2 .jar libraries:

  • one specific class need use;
  • the other ojdbc6.jar jar need driver (which allowsm me connect oracle database). such connection works on local machine , targets oracle 12.c database installed onto linux environment.

the 2 .jars listed build.xml file, built ant.

when import file linux environment - in installation of ibm infosphere datastage - such software recognizes files , compiled classes, 1 of them has exposed method correctly invoke.

this class causes error (it works on windows 10, windows 7 eclipse environments).

public static void loaddriver(){     try {         drivermanager.registerdriver(new oracle.jdbc.oracledriver());     } catch (sqlexception e) {         system.out.println("*** drivermanager error: driver not found ***");         e.printstacktrace();     } } 

the error find on linux is: java.lang.classnotfoundexception: oracle.jdbc.oracledriver have when execute command contained try clause. works on windows7 , window10 (local machines).

where wrong?


further details. build classpath:

<path id="myproject.classpath">     <pathelement location="bin"/>     <pathelement location="lib/ojdbc6.jar"/>     <pathelement location="lib/ccjava-api.jar"/> </path> 

when unzip .jar file, have (among other files) lib folder, contains 2 libraries ojdbc6.jar , ccjava-api.jar

problem solved! needed put 2 configuration files within datastage installation folder, targeting java class in use .jar.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -