Closed brunosimioni closed 12 years ago
Strange.This is the exact bug we fixed using Dynamic Class loading during coding of the project itself.I will try to reproduce the bug,but it is unlikely that it will get reproduced(For the solution,please see JDBCDriverLoader.java and its use in JDBCUtils.java)
Are you sure you are on the latest version of the project?
Atri
On Wed, Sep 26, 2012 at 7:01 PM, brunosimioni notifications@github.comwrote:
It appears not working properly when using two distinct servers with jdbc_fdw. The second classpath is just ignored after quering the first one.
Steps to reproduce.
- Create server serverA FOREIGN DATA WRAPPER ... OPTIONS (driverA)
- Create server serverB FOREIGN DATA WRAPPER ... OPTIONS (driverB)
- CREATE FOREIGN TABLE TableA ON SERVER A.
- CREATE FOREIGN TABLE TableB ON SERVER B.
- SELECT on TableA works.
- SELECT on TableB throws java.lang.ClassNotFoundException:
The inverse order throws the same exception too. Executing the step 6 first, and then step 5, but the serverA driver is not found.
StackTrace:
ERROR: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at JDBCUtils.Initialize(JDBCUtils.java:78)
— Reply to this email directly or view it on GitHubhttps://github.com/atris/JDBC_FDW/issues/2.
Regards,
Atri l'apprenant
Could you give me more details(The databases A and B,and the name of the drivers you are using for them?)
Atri
On Wed, Sep 26, 2012 at 10:08 PM, Atri Sharma atri.jiit@gmail.com wrote:
Strange.This is the exact bug we fixed using Dynamic Class loading during coding of the project itself.I will try to reproduce the bug,but it is unlikely that it will get reproduced(For the solution,please see JDBCDriverLoader.java and its use in JDBCUtils.java)
Are you sure you are on the latest version of the project?
Atri
On Wed, Sep 26, 2012 at 7:01 PM, brunosimioni notifications@github.comwrote:
It appears not working properly when using two distinct servers with jdbc_fdw. The second classpath is just ignored after quering the first one.
Steps to reproduce.
- Create server serverA FOREIGN DATA WRAPPER ... OPTIONS (driverA)
- Create server serverB FOREIGN DATA WRAPPER ... OPTIONS (driverB)
- CREATE FOREIGN TABLE TableA ON SERVER A.
- CREATE FOREIGN TABLE TableB ON SERVER B.
- SELECT on TableA works.
- SELECT on TableB throws java.lang.ClassNotFoundException:
The inverse order throws the same exception too. Executing the step 6 first, and then step 5, but the serverA driver is not found.
StackTrace:
ERROR: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at JDBCUtils.Initialize(JDBCUtils.java:78)
— Reply to this email directly or view it on GitHubhttps://github.com/atris/JDBC_FDW/issues/2.
Regards,
Atri l'apprenant
Regards,
Atri l'apprenant
For sure!
Yes, I'm using the latest version of repo (cloned yesterday).
More details:
ERROR: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at JDBCUtils.Initialize(JDBCUtils.java:78)
Exiting psql and entering again, and executing the inverse order, brings me the same expection but the other driver.
Connecting to the database via JDBC (hibernate), instead of psql works fine. The problem appears when I acess the foreign table via psql.
In both cases,whenever you are able to fetch data from PostgreSQL/SQL Server,it is fetching data and working correctly,right?I think it is an issue with the dynamic loading of the JDBC Driver.
Atri
On Wed, Sep 26, 2012 at 1:36 PM, brunosimioni notifications@github.comwrote:
Connecting to the database via JDBC (hibernate), instead of psql works fine. The problem appears when I acess the foreign table via psql.
— Reply to this email directly or view it on GitHubhttps://github.com/atris/JDBC_FDW/issues/2#issuecomment-8898251.
Regards,
Atri l'apprenant
Closed thanks to patch by Bruno
It appears not working properly when using two distinct servers with jdbc_fdw. The second classpath is just ignored after quering the first one.
Steps to reproduce.
The inverse order throws the same exception too. Executing the step 6 first, and then step 5, but the serverA driver is not found.
StackTrace:
ERROR: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at JDBCUtils.Initialize(JDBCUtils.java:78)