MySql到Mariadb

MySql到Mariadb,mariadb,Mariadb,我一直在使用Eclipse通过mysql连接我的项目 为了连接我的sql,我在context.xml文件中使用mysql连接器 <Context reloadable="true" antiResourceLocking="true"> <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="300" maxIdle="30" maxWait="10000" name="

我一直在使用Eclipse通过mysql连接我的项目

为了连接我的sql,我在context.xml文件中使用mysql连接器

<Context reloadable="true" antiResourceLocking="true">
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
    maxActive="300" maxIdle="30" maxWait="10000" name="jdbc/tds" password="xxx"
    autoReconnect="true" removeAbandoned="true" logAbandoned="true" removeAbandonedTimeout="60"
    type="javax.sql.DataSource" url="jdbc:mysql://192.168.1.101:3306/tds?autoConnect=true"
    username="xxx" />
这是我的context.xml文件

<Context reloadable="true" antiResourceLocking="true">
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
    maxActive="300" maxIdle="30" maxWait="10000" name="jdbc/tds" password="xxx"
    autoReconnect="true" removeAbandoned="true" logAbandoned="true" removeAbandonedTimeout="60"
    type="javax.sql.DataSource" url="jdbc:mysql://192.168.1.101:3306/tds?autoConnect=true"
    username="xxx" />
导入java.sql.PreparedStatement; 导入java.sql.ResultSet; 导入java.sql.SQLException; 导入java.sql.Timestamp

就像在这些行中一样,它显示错误,在其他一些java文件中也是一样


我不知道问题出在哪里。

尝试将com.mariadb.jdbc.Driver更改为drivercassname中的org.mariadb.jdbc.Driver

是否可以包含错误堆栈跟踪输出?
import java.sql.Connection;