Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websphere can't load the driver #768

Closed
davecramer opened this issue Mar 6, 2017 · 0 comments
Closed

websphere can't load the driver #768

davecramer opened this issue Mar 6, 2017 · 0 comments
Milestone

Comments

@davecramer
Copy link
Member

@davecramer davecramer commented Mar 6, 2017

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

back in the datasource code

@vlsi vlsi added this to the 42.0.1 milestone Mar 7, 2017
jorsol added a commit to jorsol/pgjdbc that referenced this issue Mar 8, 2017
The current DataSource implementation relies in DriverManager to get a connection, but the DriverManager
requires that the driver is registered and when the org.postgresql.Driver is called it's automatically
registered in a static initializer block, but for the DataSource class it is not called.

To trigger the register of the driver, simply make a call to org.postgresql.Driver.isRegistered() which
checks if the driver is registered and initialize the class if not.

closes pgjdbc#768
@vlsi vlsi closed this in 9c80adc Mar 8, 2017
xabolcs added a commit to xabolcs/openseedbox that referenced this issue May 16, 2017
davecramer added a commit to davecramer/pgjdbc that referenced this issue Sep 19, 2017
…DataSource interface

This initialization was removed by accident in c99507b

closes pgjdbc#768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.