Java 6's rhino / javascript database connectivity

Hi

I am trying to load the Sybase database driver within the javascript and doesn't seem to get it working... Here are my sample command/code:

command:

jrunscript -classpath "c:\javascript\jconn2.jar" testdb.js

source code of testdb.js:

1 importPackage(java.sql);

2 importPackage(java.lang);

3

4 Class.forName("com.sybase.jdbc2.jdbc.SybDriver");

The error is:

C:\javascript>jrunscript -classpath "c:\javascript\jconn2.jar" testdb.js

script error in file testdb.js : sun.org.mozilla.javascript.internal.WrappedExce

ption: Wrapped java.lang.ClassNotFoundException: com/sybase/jdbc2/jdbc/SybDriver

(testdb.js#4) in testdb.js at line number 4

Anyone has an idea?

Thanks,

Edmond

[782 byte] By [tradercentrica] at [2007-10-3 10:45:38]
# 1
Well this is a classpath issue... but I have no idea how to solve it with this stuff (rhino/js).
cotton.ma at 2007-7-15 6:09:59 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 2
I tried to insert a new record from a Javascript code but it is giving me error of either provider type of lock type.plz help me to solve this problem.
MD_mukhtara at 2007-7-15 6:09:59 > top of Java-index,Other Topics,Java Community Process (JCP) Program...