History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-761
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Matt Raible
Reporter: Steve Tynor
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
AppFuse

h2 and hsqldb lock errors for "mvn integration-test"

Created: 22/May/07 12:36 PM   Updated: 30/May/07 01:20 AM
Component/s: Build, Test, or Deploy Process
Affects Version/s: 2.0-M5
Fix Version/s: None

Environment: Windows XP, maven 2.0.6, JDK 1.5.0_11


 Description  « Hide
So something isn't closing the database properly eh? I was able to
reproduce this problem on my end, so you should probably enter an
issue for it. As a workaround, I found that commenting out the second
<execution> block in the dbunit plugin's configuration solves the
problem.

Matt

On 5/22/07, Steve Tynor <stynor@gmail.com> wrote:
> Matt,
>
> Confirmed fixed. Now I can give you a cookbook to reproduce the
> h2/hsqldb lock errors:
>
> # mvn archetype:create -DarchetypeGroupId=org.appfuse
> -DarchetypeArtifactId=appfuse-basic-jsf
> -DremoteRepositories=http://static.appfuse.org/repository
> -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app
> -DartifactId=myproject
>
> # mvn appfuse:full-source
>
> then edit pom.xml to replace the test database mysql config at the
> bottom of the pom.xml with:
>
>
> <dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory</dbunit.dataTypeFactoryName>
> <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
> <hibernate.dialect>org.hibernate.dialect.HSQLDialect</hibernate.dialect>
> <jdbc.groupId>hsqldb</jdbc.groupId>
> <jdbc.artifactId>hsqldb</jdbc.artifactId>
> <jdbc.version>1.8.0.7</jdbc.version>
> <jdbc.driverClassName>org.hsqldb.jdbcDriver</jdbc.driverClassName>
> <jdbc.url><![CDATA[jdbc:hsqldb:myproject;shutdown=true]]></jdbc.url>
> <jdbc.username>sa</jdbc.username>
> <jdbc.password></jdbc.password>
>
> # mvn clean integration-test
>
> et voila:
>
> [INFO] [dbunit:operation {execution: test}]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing database operation: CLEAN_INSERT
>
> Embedded error: The database is already in use by another process:
> org.hsqldb.persist.NIOLockFile@a4df0f73[file=C:\newdev\appfuse-clean\test-for-h2\myproject\myproject.lck,
> exists=true, locked=false, valid=false, fl =null]: java.lang.Exception:
> java.io.IOException: The process cannot access the file because
> another process has locked a portion of the file :
> C:\newdev\appfuse-clean\test-for-h2\myproject\myproject.lck
>
>
> Steve


 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 30/May/07 01:20 AM
Can you try specifying an absolute path for the jdbc URL? For example:

<jdbc.url><![CDATA[jdbc:hsqldb:/temp/myproject/myprojectdb;shutdown=true]]></jdbc.url>

I'm using a Struts 2 Modular Archetype on my current project (with H2) and this works fine. Here's