Closed GuidoDechamps closed 9 years ago
Hi Guido,
Can you send me the output containing the error?
Thanks, Brian
On 26 November 2014 at 13:13, Guido Dechamps notifications@github.com wrote:
I have the following maven plugin configuration where i try to clean the database, create the tables, insert some data. When Inserting the data using a sql script it does not work when the db is H2. It does work when the db is hsqldb. Using a dbunit datascriptb on a h2 database does work.
com.btmatthews.maven.plugins.inmemdb inmemdb-maven-plugin 1.4.3
11527 inmemdb h2 testDB
<dataSet> <sourceFile>${project.basedir}/src/test/resources/sql/dataSet.xml</sourceFile> </dataSet> <!--<script>-->, <!--<sourceFile>${project.basedir}/src/test/resources/sql/test-data.sql</sourceFile>--> <!--</script>--> </sources> </configuration> </plugin>
— Reply to this email directly or view it on GitHub https://github.com/bmatthews68/inmemdb-maven-plugin/issues/21.
I'm afraid i have to stand corrected. The issue was due to connection strings.
Having a look in the code i saw that the url created was jdbc:h2:tcp://localhost/mem:testDB This does start an in memory database that is available from outside the process.
The connection defined in the datasource was incorrect as it started it's own db persisted to a file jdbc:h2:tcp://localhost/~/testDB starts a h2 db perisisted to the user home dir
Setting a user and password on the db in the inmemdb-maven-plugin quickly identified all the errors. So issue closed.
And thanks for the plugin :)
Inserting data via script on h2 db does not work.
I have the following maven plugin configuration where i try to clean the database, create the tables, insert some data. When Inserting the data using a sql script it does not work when the db is H2. It does work when the db is hsqldb. Using a dbunit datascriptb on a h2 database does work.