Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Java 6's rhino / javascript database connectivity

843853Nov 24 2006 — edited Jul 14 2010
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 11 2010
Added on Nov 24 2006
4 comments
495 views