0
我一直在使用Eclipse用mysql連接我的項目..MySQL來MariaDB的
要使用MySQL的連接器在我的context.xml文件與我的SQL我'連接
這是我的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" />
我也想毫秒存儲在我的項目,所以我從MySQL到MariaDB的遷移..
所以,我下載MariaDB的連接器,並添加爲我的項目中的外部jar文件..
,改變了背景文件
<Context reloadable="true" antiResourceLocking="true">
<Resource auth="Container" driverClassName="com.mariadb.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:mariadb://192.168.1.101:3306/tds?autoConnect=true"
username="xxx" />
,但它給我的錯誤在我的java文件,即行這樣
import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp;
方式在這些線路將其示值誤差,也同樣在一些其他Java文件也..
我不知道是什麼問題..
你能包括錯誤堆棧跟蹤輸出? –