I'm using Spring's <jdbc:embedded>
to run integration and acceptance tests using HSQLDB. If I include the hsqldb.jar
on the application's classpath then 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 as I can configure a datatsource on JBoss using the it but can't figure out why it's not on my application classpath. Are jdbc drivers only available through a configured datasource on Jboss or is there something else i need to do to make it available?
I had same problem in using Spring's but with H2 database. There are 2 possibilities, you can put the corresponding .jar to your database in the lib folder of your server. Or you can put it in your webApp. i have chosen the latest possibility, so i put this dependency in my pom.xml:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>XXXXXX</version>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With