gpt4 book ai didi

java - MyBatis 正在寻找 org/hsqldb/DatabaseURL,而我设置为 MmySQL

转载 作者:行者123 更新时间:2023-11-29 13:32:25 31 4
gpt4 key购买 nike

我使用 Maven3/Guice/MyBatis3.1 并使用“jdbc:mysql://...”建立了一个示例项目

但是当我想调用映射器方法(mapper.getBean())时,我得到:

java.lang.NoClassDefFoundError: org/hsqldb/DatabaseURL at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:579) at java.sql.DriverManager.getConnection(DriverManager.java:190) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:191) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88) at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373) at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82) at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131) at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)

最佳答案

确保包含 org.hsqldb.DatabaseURL 的库位于您的类路径

关于java - MyBatis 正在寻找 org/hsqldb/DatabaseURL,而我设置为 MmySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19233888/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com