I finally resolved this issue. Exclude the pg driver from war, and copy it
to tomcat/lib, it works.

I remember in the past years,  I preferred tomcat for Java Web applications
because I did not need to register a Jdbc driver but  it is tedious work in
Java EE application servers, such as Glassfish, etc. But since Java EE 7,
it supports packaging Jdbc drivers into war and register it automatically
when deploying the application to the application servers.

What happened in the tomcat classloader and war application classloader of
Tomcat 10?

*Hantsy Bai*

Self-employed consultant, fullstack developer, agile coach

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsy


On Mon, Jan 3, 2022 at 12:02 PM hantsy bai <han...@gmail.com> wrote:

> I have tried to update myself  Spring 6/Jakarta EE9/Java 17, etc, and
> created a simple war application, when deployed to Tomcat 10, failed, due
> to the famous *no suitable drivers*.
>
> I have created a detailed post on stackoverflow:
>
>
> https://stackoverflow.com/questions/70554119/no-suitable-drivers-available-when-deploying-a-spring-6-war-to-tomcat-10
>
> Any suggestion is welcome.
> Thanks.
>
> *Hantsy Bai*
>
> Self-employed consultant, fullstack developer, agile coach
>
> GitHub: https://github.com/hantsy
>
> Twitter: https://twitter.com/@hantsy
> Medium: https://medium.com/@hantsy
>

Reply via email to