【发布时间】:2012-04-01 05:48:42
【问题描述】:
我正在使用 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
JBoss 可以看到驱动程序,因为我可以使用它在 JBoss 上配置数据源,但无法弄清楚为什么它不在我的应用程序类路径中。 jdbc 驱动程序是否只能通过 Jboss 上的配置数据源获得,还是我需要做其他事情才能使其可用?
【问题讨论】: