Topic "No suitable driver (JAVA program using DB2)"

Author Message
abdaizs
[View user's profile]

Joined: 2009-04-10
Posts: 3
Location: Budapest
Hi all,

I have a problem.
I have a shell script, which is calling a java program. (using DB2 in background)
In putty, it works, but in when I tried to call it in WinSCP, i have an error message. The driver is given in sh with FULL path, also it can not be wrong, however it works, when I tried in console window.


* 2009-04-10 10:59:30.809 (ETerminal) Command './export.sh'
* 2009-04-10 10:59:30.809 failed with return code 0 and error message
* 2009-04-10 10:59:30.809 java.sql.SQLException: No suitable driver

Can anybody help for me, what am i doing wrong?

Thx, for help!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Your script probably relies on some environment variables. These maybe set from startup script that is not executed for non-interactive sessions (WinSCP).
_________________
Martin Prikryl
abdaizs
[View user's profile]

Joined: 2009-04-10
Posts: 3
Location: Budapest
Hi,

Thanks for the answer.
The sh file contains a following line:

/usr/lib/java/jre/bin/java -cp importer.jar:/opt/STS/Import/db2java.zip hu.Export

So java and db2java.zip is definied with full path, without any environment variables. I have changed a shell on Suse Linux to Bash 3.2, before the changing, the winscp script worked.

Don't you have any other idea?


Thx,
Zsolt


prikryl wrote:
Your script probably relies on some environment variables. These maybe set from startup script that is not executed for non-interactive sessions (WinSCP).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
OK, but the Java itself or the package you are executing may depend on environment variables.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License