Hantsy,

On 1/5/22 23:31, hantsy bai wrote:
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?

They still exist. The detailed answer to your question is on Stack Overflow. What about that answer do you not understand? It explains what you would need to do in order to get the driver to work when placed in your WAR bundle.

The problem is not Tomcat; the problem is the way that DriverManager works, and Tomcat has no control over that.

-chris

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



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to