aspose file tools*
The moose likes JDBC and the fly likes Connection OK in JDK1.3, but fails in JDK1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection OK in JDK1.3, but fails in JDK1.4" Watch "Connection OK in JDK1.3, but fails in JDK1.4" New topic
Author

Connection OK in JDK1.3, but fails in JDK1.4

Patrick Muls
Greenhorn

Joined: Aug 08, 2001
Posts: 25
I'm using a JDBC connection to access an Oracle db. Using JDK 1.3 it functions OK with the following run-command:
set JDK=C:\jdk1.3.1\jre
set PROJ=C:\Distro
set ORACLE=%PROJ%\classes12.zip
set path=.;%JDK%\bin;
set classpath=.;%PROJ%;%ORACLE%;%JDK%\jre\lib\rt.jar;
set classpath
java -version
java -Duser.language=nl -Duser.region=BE -jar NAL.jar
pause
However using the same command to use JDK1.4, I get an SQLSTATE='080004' saying it is not possible to connect to this driver. The commandfile, program-jar, and DB however are the same:
set JDK=C:\Program Files\Java\j2re1.4.1_01
set PROJ=C:\Distro
set ORACLE=%PROJ%\classes12.zip
set path=.;%JDK%\bin;
set classpath=.;%PROJ%;%ORACLE%;%JDK%\jre\lib\rt.jar;
set classpath
java -version
java -Duser.language=nl -Duser.region=BE -jar NAL.jar
pause
Has anybdy any suggestions to explain, and resolve, this strange behavior?
Patrick Muls
Datassur, Belgium
Patrick Muls
Greenhorn

Joined: Aug 08, 2001
Posts: 25
We got around to solving this problem. It turns out that the environment variable PROJ doesn't seem to play any role in allocating the driver zipfile to the application. Putting the classes12.zip file in the EXT-directory of the JDK however did solve the problem.
Patrick Muls
Greenhorn

Joined: Aug 08, 2001
Posts: 25
Sorry, I meant variable ORACLE, not PROJ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection OK in JDK1.3, but fails in JDK1.4