atris / JDBC_FDW

FDW that wraps JDBC for PostgreSQL.It can be used to connect and fetch data from any data source that supports JDBC
Other
66 stars 38 forks source link

NullPointerException at JDBCUtils.Close(JDBCUtils.java:181) #21

Closed hginzel closed 4 years ago

hginzel commented 8 years ago

I am testing jdbc_fdw against Teradata 14.10

CREATE EXTENSION IF NOT EXISTS jdbc_fdw;
DROP SERVER IF EXISTS TD_Dev CASCADE;
CREATE SERVER TD_Dev FOREIGN DATA WRAPPER jdbc_fdw OPTIONS (
drivername  'com.teradata.jdbc.TeraDriver',
url     'jdbc:teradata://host/database=foo',     -- ,tmode=ANSI,charset=LATIN1250_1A0
jarfile '/opt/Teradata/jdbc/terajdbc4.jar'
-- querytimeout '35',
-- maxheapsize  '600'
);
CREATE USER MAPPING FOR CURRENT_USER SERVER TD_Dev
OPTIONS (username 'foo', password 'bar');
CREATE FOREIGN TABLE Test_td1 (Id int, Code text) SERVER TD_Dev
OPTIONS (QUERY 'SELECT * FROM foo.test1');
SELECT * FROM Test_td1;

with result

…
CREATE FOREIGN TABLE
psql:test_TD_fdw.sql:26: ERROR:  java.lang.NullPointerException
        at JDBCUtils.Close(JDBCUtils.java:181)

PostgreSQL 9.4. How can I solve this, please?

pafiti commented 8 years ago

Hi ginzel,

I get exactly the same issue trying to get access to Phoenix server with jdbc_fdw and PostgreSQL 9.5. Have you been able to solve this issue ?

Thanks

ftzdomino commented 5 years ago

Here's my workaround: https://github.com/atris/JDBC_FDW/pull/32

atris commented 4 years ago

Fixed