pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem updating driver to 42.0.0
4+ messages / 2 participants
[nested] [flat]

* Problem updating driver to 42.0.0
@ 2017-03-03 09:40 Bogdan Daniliuc <bdaniliuc@montran.com>
  2017-03-04 21:00 ` Re: Problem updating driver to 42.0.0 Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Bogdan Daniliuc @ 2017-03-03 09:40 UTC (permalink / raw)
  To: pgsql-jdbc

Hello,

We are encountering an error when trying to update the driver from 
postgresql-9.4.1212 to postgresql-42.0.0 in WebSphere 8.5.5

With 42.0.0, we get:

Failed to create a ConnectionPoolDataSource from PostgreSQL JDBC Driver 
42.0.0 for testDB at jdbc:postgresql://localhost:5432/testDB: 
java.sql.SQLException: No suitable driver found for 
jdbc:postgresql://localhost:5432/testDB

DSRA8201W: DataSource Configuration: DSRA8040I: Failed to connect to the 
DataSource DS2.  Encountered java.sql.SQLException: No suitable driver 
found for jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State = 
08001, Error Code = 0.
java.sql.SQLException: No suitable driver found for 
jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State = 08001, 
Error Code = 0
     at java.sql.DriverManager.getConnection(DriverManager.java:700)
     at java.sql.DriverManager.getConnection(DriverManager.java:258)
     at 
org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:79)
     at 
org.postgresql.ds.PGConnectionPoolDataSource.getPooledConnection(PGConnectionPoolDataSource.java:69)


The driver is in a c:\driver directory. It works if the driver is moved 
in AppServer\java_1.8_64\jre\lib\ext, but this is not recommended by IBM.

9.2.1212 and 1211 all work when placed in the same directory.

Thank you,

Bogdan



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem updating driver to 42.0.0
  2017-03-03 09:40 Problem updating driver to 42.0.0 Bogdan Daniliuc <bdaniliuc@montran.com>
@ 2017-03-04 21:00 ` Dave Cramer <pg@fastcrypt.com>
  2017-03-06 08:23   ` Re: Problem updating driver to 42.0.0 Bogdan Daniliuc <bdaniliuc@montran.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Dave Cramer @ 2017-03-04 21:00 UTC (permalink / raw)
  To: Bogdan Daniliuc <bdaniliuc@montran.com>; +Cc: pgsql-jdbc

Hi Bogdan

How would websphere find it if was in c:\driver

I'm sort of clue free here ?

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 3 March 2017 at 04:40, Bogdan Daniliuc <bdaniliuc@montran.com> wrote:

> Hello,
>
> We are encountering an error when trying to update the driver from
> postgresql-9.4.1212 to postgresql-42.0.0 in WebSphere 8.5.5
>
> With 42.0.0, we get:
>
> Failed to create a ConnectionPoolDataSource from PostgreSQL JDBC Driver
> 42.0.0 for testDB at jdbc:postgresql://localhost:5432/testDB:
> java.sql.SQLException: No suitable driver found for
> jdbc:postgresql://localhost:5432/testDB
>
> DSRA8201W: DataSource Configuration: DSRA8040I: Failed to connect to the
> DataSource DS2.  Encountered java.sql.SQLException: No suitable driver
> found for jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State =
> 08001, Error Code = 0.
> java.sql.SQLException: No suitable driver found for
> jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State = 08001,
> Error Code = 0
>     at java.sql.DriverManager.getConnection(DriverManager.java:700)
>     at java.sql.DriverManager.getConnection(DriverManager.java:258)
>     at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDa
> taSource.java:79)
>     at org.postgresql.ds.PGConnectionPoolDataSource.getPooledConnec
> tion(PGConnectionPoolDataSource.java:69)
>
>
> The driver is in a c:\driver directory. It works if the driver is moved in
> AppServer\java_1.8_64\jre\lib\ext, but this is not recommended by IBM.
>
> 9.2.1212 and 1211 all work when placed in the same directory.
>
> Thank you,
>
> Bogdan
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem updating driver to 42.0.0
  2017-03-03 09:40 Problem updating driver to 42.0.0 Bogdan Daniliuc <bdaniliuc@montran.com>
  2017-03-04 21:00 ` Re: Problem updating driver to 42.0.0 Dave Cramer <pg@fastcrypt.com>
@ 2017-03-06 08:23   ` Bogdan Daniliuc <bdaniliuc@montran.com>
  2017-03-06 11:50     ` Re: Problem updating driver to 42.0.0 Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Bogdan Daniliuc @ 2017-03-06 08:23 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

Hi Dave,

There is a WebSphere variable defined, POSTGRES_JDBC_DRIVER_PATH 
pointing to that folder. The JDBC provider is then defined having the 
database class path information either 
${POSTGRES_JDBC_DRIVER_PATH}/postgresql-9.4.1212.jar or 
${POSTGRES_JDBC_DRIVER_PATH}/postgresql-42.0.0.jar.

The folder contains only the corresponding JAR file to eliminate any 
interference.

I performed additional experiments, based on the assumption that this is 
a class loader issue. After we added in 
org.postgresql.ds.common.BaseDataSource the following code (that is 
present in 9.4.12121 but not in 42.0.0), the driver worked:

     static {
         try {
           Class.forName("org.postgresql.Driver");
         } catch (ClassNotFoundException e) {
           System.err.println("PostgreSQL DataSource unable to load 
PostgreSQL JDBC Driver");
         }
       }

I'm not sure if this is the correct fix.

Thank you,

Bogdan Daniliuc



> Hi Bogdan
>
> How would websphere find it if was in c:\driver
>
> I'm sort of clue free here ?
>
> Dave Cramer
>
> davec@postgresintl.com <mailto:davec@postgresintl.com>
> www.postgresintl.com <http://www.postgresintl.com;
>
> On 3 March 2017 at 04:40, Bogdan Daniliuc <bdaniliuc@montran.com 
> <mailto:bdaniliuc@montran.com>> wrote:
>
>     Hello,
>
>     We are encountering an error when trying to update the driver from
>     postgresql-9.4.1212 to postgresql-42.0.0 in WebSphere 8.5.5
>
>     With 42.0.0, we get:
>
>     Failed to create a ConnectionPoolDataSource from PostgreSQL JDBC
>     Driver 42.0.0 for testDB at
>     jdbc:postgresql://localhost:5432/testDB: java.sql.SQLException: No
>     suitable driver found for jdbc:postgresql://localhost:5432/testDB
>
>     DSRA8201W: DataSource Configuration: DSRA8040I: Failed to connect
>     to the DataSource DS2.  Encountered java.sql.SQLException: No
>     suitable driver found for jdbc:postgresql://localhost:5432/testDB
>     DSRA0010E: SQL State = 08001, Error Code = 0.
>     java.sql.SQLException: No suitable driver found for
>     jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State =
>     08001, Error Code = 0
>         at java.sql.DriverManager.getConnection(DriverManager.java:700)
>         at java.sql.DriverManager.getConnection(DriverManager.java:258)
>         at
>     org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:79)
>         at
>     org.postgresql.ds.PGConnectionPoolDataSource.getPooledConnection(PGConnectionPoolDataSource.java:69)
>
>
>     The driver is in a c:\driver directory. It works if the driver is
>     moved in AppServer\java_1.8_64\jre\lib\ext, but this is not
>     recommended by IBM.
>
>     9.2.1212 and 1211 all work when placed in the same directory.
>
>     Thank you,
>
>     Bogdan
>
>
>
>     -- 
>     Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org
>     <mailto:pgsql-jdbc@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/mailpref/pgsql-jdbc
>     <http://www.postgresql.org/mailpref/pgsql-jdbc;
>
>


-- 

___________________________________________________________
This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accordance with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except with formal written approval. The sender cannot guarantee the integrity of this message. Montran Corporation (and its subsidiaries) shall not therefore be liable for the message if modified.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem updating driver to 42.0.0
  2017-03-03 09:40 Problem updating driver to 42.0.0 Bogdan Daniliuc <bdaniliuc@montran.com>
  2017-03-04 21:00 ` Re: Problem updating driver to 42.0.0 Dave Cramer <pg@fastcrypt.com>
  2017-03-06 08:23   ` Re: Problem updating driver to 42.0.0 Bogdan Daniliuc <bdaniliuc@montran.com>
@ 2017-03-06 11:50     ` Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Cramer @ 2017-03-06 11:50 UTC (permalink / raw)
  To: Bogdan Daniliuc <bdaniliuc@montran.com>; +Cc: pgsql-jdbc

Hi Bogdan,

Thanks for this!

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 6 March 2017 at 03:23, Bogdan Daniliuc <bdaniliuc@montran.com> wrote:

> Hi Dave,
>
> There is a WebSphere variable defined, POSTGRES_JDBC_DRIVER_PATH pointing
> to that folder. The JDBC provider is then defined having the database class
> path information either ${POSTGRES_JDBC_DRIVER_PATH}/postgresql-9.4.1212.jar
> or ${POSTGRES_JDBC_DRIVER_PATH}/postgresql-42.0.0.jar.
>
> The folder contains only the corresponding JAR file to eliminate any
> interference.
>
> I performed additional experiments, based on the assumption that this is a
> class loader issue. After we added in org.postgresql.ds.common.BaseDataSource
> the following code (that is present in 9.4.12121 but not in 42.0.0), the
> driver worked:
>
>     static {
>         try {
>           Class.forName("org.postgresql.Driver");
>         } catch (ClassNotFoundException e) {
>           System.err.println("PostgreSQL DataSource unable to load
> PostgreSQL JDBC Driver");
>         }
>       }
>
> I'm not sure if this is the correct fix.
>
> Thank you,
>
> Bogdan Daniliuc
>
>
>
> Hi Bogdan
>
> How would websphere find it if was in c:\driver
>
> I'm sort of clue free here ?
>
> Dave Cramer
>
> davec@postgresintl.com
> www.postgresintl.com
>
> On 3 March 2017 at 04:40, Bogdan Daniliuc <bdaniliuc@montran.com> wrote:
>
>> Hello,
>>
>> We are encountering an error when trying to update the driver from
>> postgresql-9.4.1212 to postgresql-42.0.0 in WebSphere 8.5.5
>>
>> With 42.0.0, we get:
>>
>> Failed to create a ConnectionPoolDataSource from PostgreSQL JDBC Driver
>> 42.0.0 for testDB at jdbc:postgresql://localhost:5432/testDB:
>> java.sql.SQLException: No suitable driver found for
>> jdbc:postgresql://localhost:5432/testDB
>>
>> DSRA8201W: DataSource Configuration: DSRA8040I: Failed to connect to the
>> DataSource DS2.  Encountered java.sql.SQLException: No suitable driver
>> found for jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State =
>> 08001, Error Code = 0.
>> java.sql.SQLException: No suitable driver found for
>> jdbc:postgresql://localhost:5432/testDB DSRA0010E: SQL State = 08001,
>> Error Code = 0
>>     at java.sql.DriverManager.getConnection(DriverManager.java:700)
>>     at java.sql.DriverManager.getConnection(DriverManager.java:258)
>>     at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDa
>> taSource.java:79)
>>     at org.postgresql.ds.PGConnectionPoolDataSource.getPooledConnec
>> tion(PGConnectionPoolDataSource.java:69)
>>
>>
>> The driver is in a c:\driver directory. It works if the driver is moved
>> in AppServer\java_1.8_64\jre\lib\ext, but this is not recommended by IBM.
>>
>> 9.2.1212 and 1211 all work when placed in the same directory.
>>
>> Thank you,
>>
>> Bogdan
>>
>>
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>
>
>
>
> --
>
> ___________________________________________________________
> This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accordance with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except with formal written approval. The sender cannot guarantee the integrity of this message. Montran Corporation (and its subsidiaries) shall not therefore be liable for the message if modified.
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-03-06 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03 09:40 Problem updating driver to 42.0.0 Bogdan Daniliuc <bdaniliuc@montran.com>
2017-03-04 21:00 ` Dave Cramer <pg@fastcrypt.com>
2017-03-06 08:23   ` Bogdan Daniliuc <bdaniliuc@montran.com>
2017-03-06 11:50     ` Dave Cramer <pg@fastcrypt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox