Spring jdbc: embedded database cannot access jdbc driver on JBoss AS 7

I use Spring <jdbc:embedded>to run integration and acceptance tests using HSQLDB. If I include the hsqldb.jarapplication class path, everything works, but moving the driver to JBoss as a module, I get the following exception:

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 can see the driver, because I can configure the datatsource on JBoss using it, but I cannot understand why it is not in my application class path. Are jdbc drivers available only through a configured data source on Jboss, or is there something else I need to do to make it available?

+5
source share
3 answers

, , .
hsqldb.jar classpath
maven, maven repo pom.
.
!

+2

Spring, H2. 2 , .jar lib . webApp. , pom.xml:

<dependency>
   <groupId>com.h2database</groupId>
   <artifactId>h2</artifactId>
   <version>XXXXXX</version>

+2

HSQL. maven, :

    <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
    </dependency>
0

All Articles