我正在尝试在OpenShift在线部署OpenGTS_2.6.0,其中我有Tomcat7 MySQL-5.5和Ant Cartridge 0.1.So 我不知道如何将mysql jdbc驱动程序安装到tomcat和java目录中,我的项目是基于ant而不是基于maven的项目。
>Version: 2.6.0
[WARN_|DBProvider.loadJDBCDriver:806] JDBC driver class not found: com.mysql.jdbc.Driver
[WARN_|DBProvider.loadJDBCDriver:806] JDBC driver class not found: org.gjt.mm.mysql.Driver
[WARN_|DBProvider.loadJDBCDriver:806] JDBC driver class not found: org.mariadb.jdbc.Driver
[ERROR|DBProvider.loadJDBCDriver:827] -------------------------------------------------------------------------
[ERROR|DBProvider.loadJDBCDriver:832] Install the JDBC jar file in one of the following directories:
[ERROR|DBProvider.loadJDBCDriver:834] > /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91/jre/lib/ext
[ERROR|DBProvider.loadJDBCDriver:834] > /usr/java/packages/lib/ext
[ERROR|DBProvider.loadJDBCDriver:843] (NOTE: The installed jar file permissions must also be world-readable)
[ERROR|DBProvider.loadJDBCDriver:844] -------------------------------------------------------------------------
[ERROR|DBAdmin.execCommands:940] SQLException message: No suitable driver found for jdbc:mysql://localhost:3306/
[ERROR|DBAdmin.execCommands:941] ==> SQLException: DB create error [jdbc:mysql://localhost:3306/]
[ERROR|DBAdmin.execCommands:941] Message: No suitable driver found for jdbc:mysql://localhost:3306/
[ERROR|DBAdmin.execCommands:941] SQLState: 08001
[ERROR|DBAdmin.execCommands:941] ErrorCode: 0
[DBAdmin.execCommands:941] java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at org.opengts.dbtools.DBConnection.getConnection(DBConnection.java:662)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:772)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:760)
at org.opengts.dbtools.DBConnection._executeUpdate(DBConnection.java:1014)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:969)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:950)
at org.opengts.dbtools.DBProvider.createDatabase(DBProvider.java:1699)
at org.opengts.dbtools.DBAdmin.execCommands(DBAdmin.java:929)
at org.opengts.db.DBConfig._main(DBConfig.java:1833)
at org.opengts.db.DBConfig.main(DBConfig.java:1948)
直接来自 Tomcat 文档:
在继续之前,不要忘记将 JDBC 驱动程序的罐子复制到 $CATALINA_HOME/LIB.