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

前端 未结 16 1518
广开言路
广开言路 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:20

    A very silly mistake which could be possible resulting is adding of space at the start of the JDBC URL connection.

    What I mean is:-

    suppose u have bymistake given the jdbc url like

    String jdbcUrl=" jdbc:mysql://localhost:3306/web_customer_tracker?useSSL=false&serverTimeZone=UTC";
    

    (Notice there is a space in the staring of the url, this will make the error)

    the correct way should be:

    String jdbcUrl="jdbc:mysql://localhost:3306/web_customer_tracker?useSSL=false&serverTimeZone=UTC";
    

    (Notice no space in the staring, you may give space at the end of the url but it is safe not to)

提交回复
热议问题