Re: JLink class is loaded but cannot be found?
- To: mathgroup at smc.vnet.net
- Subject: [mg66560] Re: JLink class is loaded but cannot be found?
- From: wbogorad at yahoo.com
- Date: Sat, 20 May 2006 04:47:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The problem is solved. According to Todd Gayley "The problem you are having is a subtle classloading problem. The JDBC DriverManager uses a rather unfortunate scheme for locating driver classes. The DriverManager only sees classes that are loaded by the same classloader that loaded the DriverManager class itself. When using J/Link, the DriverManager class is loaded by the system classloader (because it is a built-in part of Java), but the driver class is loaded by the JLinkClassLoader (because it is found via the classpath). Although there is another way around this, an easy thing to do is to put the ojdbc14.jar file into the Java runtime's "extensions" directory, which is <mathematica dir>/SystemFiles/Java/Windows/lib/ext. Then it will be found by the DriverManager and you won't need to use AddToClassPath or any other classpath-related tweaks." I've followed his recommendations and it resolved the issue. Thanks, Todd Link to the forum page for this post: http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=10494#p10494 Posted through http://www.mathematica-users.org [[postId=10494]]