No suitable driver found for jdbc:pgsql

643 views
Skip to first unread message

Ivan

unread,
May 6, 2022, 10:23:42 AM5/6/22
to dotCMS User Group
After upgrade to v22.05 I am getting the "No suitable driver found for jdbc:pgsql://dotcms:**password**@localhost/**user**" exception in catalina.out. I switch back to v22.03 and it starts up fine, but the v22.05 is failing with the exception. Any suggestions?

Thanks,
--Ivan

Ivan

unread,
May 6, 2022, 10:36:54 AM5/6/22
to dotCMS User Group
jdbc:pgsql://dotcms:**password**@localhost/dotcms_database_name

Will Ezell

unread,
May 6, 2022, 10:59:33 AM5/6/22
to dot...@googlegroups.com
Somehow it seems you are missing the `pgjdbc-ng` jdbc driver - pgjdbc-ng-0.8.7.jar - which should be in your WEB-INF/lib..   Questions  - Are you running from docker or from the binary distribution?  Also, are you running with our packaged tomcat and using postgres?  How are you configuring your db connection?



--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/cf5e7e0c-fd6c-42b6-b683-0aef56e03dd4n%40googlegroups.com.


--



382 NE 191st St #92150
Miami, Florida 33179-3899
Main: 
305-900-2001 | Direct: 978.294.9429

Ivan

unread,
May 6, 2022, 11:09:10 AM5/6/22
to dotCMS User Group
Will,
I am installing from the binary dotcms_22.05.tar.gz file. I run it on PostgreSQL. Also I use the tomcat within the dotcms package. The database connection is configures in context.xml, and I also tried the db.properties but still the same error. Either one of these files work fine with 22.03 version. I also just verified that the pgjdbc-ng-0.8.7.jar is in the dotserver/tomcat-9.0.41/webapps/ROOT/WEB-INF/lib directory. 

--Ivan

Ivan

unread,
May 6, 2022, 12:05:08 PM5/6/22
to dotCMS User Group
I assume context.xml is no longer supported in v22.05. I tried using just the context.xml file and it's not finding the connection settings at all (returning null.) So, I switched strictly to using db.properties file. It picks up the connection settings, but still getting the same exception about no suitable driver. I tested the db.properties file with v22.03 and it works as expected. Here is my db.properties content:

driverClassName=org.postgresql.Driver
jdbcUrl=jdbc:postgresql://localhost/dotcms
username=***
password=***

connectionTimeout=3000
minimumIdle=10
maximumPoolSize=60
idleTimeout=300000
maxLifetime=120000
leakDetectionThreshold=60000 

--Ivan

Will Ezell

unread,
May 6, 2022, 1:45:38 PM5/6/22
to dot...@googlegroups.com
I just downloaded 22.05, used the db.properties to config and it worked out of the box.  What version of java are you using?

Message has been deleted
Message has been deleted

Ivan

unread,
May 6, 2022, 2:09:51 PM5/6/22
to dotCMS User Group
My posts keep getting deleted... I am using Java 11.0.13. The db.properties file works fine with v.22.03. I just ran another test in v22.05... I placed the pgjdbc-ng-0.8.7.jar file into the /tomcat-9.0.41/lib folder and the v22.05 picked it up and started successfully. When the pgjdbc-ng-0.8.7.jar file is only in the /tomcat-9.0.41/webapps/ROOT/WEB-INF/lib folder, it doesn't work.

For the test that you just did with v22.05, do you have the pgjdbc-ng-0.8.7.jar file somewhere else on your system that allows the driver to be registered successfully?

--Ivan

Ivan

unread,
May 6, 2022, 2:25:48 PM5/6/22
to dotCMS User Group
Not sure if this is related, but once v22.05 started I ran a reindex in the System Maintenance and there are tons of "org.postgresql.util.PSQLException: ERROR: relation "permission_reference_seq" does not exist" exceptions. I cannot access any content under the Content menu.

--Ivan

Ivan

unread,
May 6, 2022, 2:34:10 PM5/6/22
to dotCMS User Group
I reverted back to v22.03 to get back all of the functionality. No issues in v22.03.

--Ivan
 

Will Ezell

unread,
May 9, 2022, 11:37:31 AM5/9/22
to dot...@googlegroups.com
Could you try the 22.05 docker image and point it to your db and assets?  The location of the pgjdbc driver has not changed between the versions.  I am out of ideas as to why the binary distro is not working for you, as I mentioned, I downloaded it and it worked for me.  Is there another error that happens earlier in the log file or is this the first error?

Environmental problems like this are why we are moving away from a binary distro and standardizing on distributing and running everything in docker.  

On Mon, May 9, 2022 at 10:11 AM Ivan <iblag...@gmail.com> wrote:
My post didn't get posted... I am using Java 11.0.13. The db.properties file works fine with v.22.03. I just ran another test in v22.05... I placed the pgjdbc-ng-0.8.7.jar file into the /dotserver_22.05/dotserver/tomcat-9.0.41/lib folder and the v22.05 picked it up and started successfully. When the pgjdbc-ng-0.8.7.jar file is only in the /dotserver_22.05/dotserver/tomcat-9.0.41/webapps/ROOT/WEB-INF/lib folder, it doesn't work. 

For the test that you just did with v22.05, do you have the pgjdbc-ng-0.8.7.jar file somewhere else on your system that allows the driver to be registered successfully? 

--Ivan

Ivan

unread,
May 9, 2022, 3:58:13 PM5/9/22
to dotCMS User Group
Unfortunately, I don't use Docker for this setup. But that's something that I am looking into setting up. Once I do, I will test it. Thank you again for looking into this issue. 

--Ivan

Reply all
Reply to author
Forward
0 new messages