The infamous java.sql.SQLException: No suitable driver found

前端 未结 16 1561
广开言路
广开言路 2020-11-21 05:10

I\'m trying to add a database-enabled JSP to an existing Tomcat 5.5 application (GeoServer 2.0.0, if that helps).

The app itself talks to Postgres just fine, so I kn

16条回答
  •  礼貌的吻别
    2020-11-21 05:39

    I found the followig tip helpful, to eliminate this issue in Tomcat -

    be sure to load the driver first doing a Class.forName(" org.postgresql.Driver"); in your code.

    This is from the post - https://www.postgresql.org/message-id/e13c14ec050510103846db6b0e@mail.gmail.com

    The jdbc code worked fine as a standalone program but, in TOMCAT it gave the error -'No suitable driver found'

提交回复
热议问题