« Return to Thread: Jython Class.forName()

Jython Class.forName()

by s7plc :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

I am trying to use the jtds driver to connect to a MSSQL database, and can’t get past the Class.forName line in the code. I have done exhausting google searches and found others with the same problem, but no definitive solution or workaround. I’m guessing there must be something wrong with my Jython setup or installation.

 

I am testing with NetBeans 6.7, and have tried this with Jython versions 2.2, 2.5b0+, and 2.5rc3. Within NetBeans, under services, I set up the jtds driver, and was able to define a URL and connect to my database, so I assume the rest of my code will work if I get past the Class.forName problem.

 

The code is pretty basic:

 

from java.sql import DriverManager

from java.lang import Class

 

Class.forName("net.sourceforge.jtds.jdbc.Driver")

 

Error: “java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver”

 

I found one note that mentioned adding “–verify” to the command arguments, but other notes saying that it wasn’t necessary with version 2.5.

 

Any ideas?

 

Thanks.

 

Carl

 


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users

 « Return to Thread: Jython Class.forName()