From: <php...@li...> - 2008-01-09 09:43:45
|
Hi, > I had the driver in the lib dir and it still wont work. Yes, indeed. Unfortunately this is not a bug but a feature. Even our FAQ entry is correct, although a little bit terse. It says "Class.forName", not "Class->forName", i.e. it assumes that an application.jar exists which needs access to the JDBC driver. If you switch on JDBC logging, you will see that the DriverManager skips the Mysql JDBC driver due to security constraints. Both, the application jar and the jdbc driver jar file must be loaded from the same classloader. The DriverManager checks this and revokes the registered driver because the JavaBridge.jar application and the mysql.jar driver were loaded by two different class loaders. This behaviour is correct and documented. You must create a Java application.jar file and load the "application.jar" and the "mysql.jar" in one java_require() call: java_require("application.jar;mysql.jar"); After that you can call the application.jar which in turn can use the mysql.jar as usual. > > confirmed. The above code doesn't work with our dynamic java bridge class loader. No. The fact that the DynamicClassLoader separates the loaded libraries is a feature and is well documented. This will not change. What could be changed is the behaviour of the standalone component, the "JavaBridge.jar" executable. We could use the same trick as other application servers and re-execute the jar file using our extended class loader. Regards, Jost Boekemeier __________________________________ Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. www.yahoo.de/clever |