Spring jdbc:嵌入式数据库无法访问JBoss AS 7上的jdbc驱动程序

bla*_*ank 5 spring hsqldb jboss7.x

我正在使用Spring <jdbc:embedded>来使用HSQLDB运行集成和验收测试.如果我hsqldb.jar在应用程序的类路径中包含,那么一切正常但将驱动程序作为模块移动到JBoss我得到以下异常:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: 
Property 'databaseType' threw exception; 
nested exception is java.lang.IllegalStateException: 
Driver for test database type [HSQL] is not available in the classpath
Run Code Online (Sandbox Code Playgroud)

JBoss可以看到驱动程序,因为我可以使用它在JBoss上配置数据源,但无法弄清楚为什么它不在我的应用程序类路径上.jdbc驱动程序只能通过Jboss上配置的数据源使用,还是需要做一些其他工作才能使它可用?

par*_*nja 2

也许答案已经不是相对的了,但无论如何。
你应该添加hsqldb.jar到类路径
如果使用maven检查maven repo的最新版本,并添加到pom.xml 或者在官方网站
上找到最新的并使用它。 一切顺利!