AppFuse
  1. AppFuse
  2. APF-761

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-M5
    • Fix Version/s: 2.2.1
    • Labels:
      None
    • Environment:
      Windows XP, maven 2.0.6, JDK 1.5.0_11

      Description

      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

        Activity

        Steve Tynor created issue -
        Matt Raible made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2 [ 10120 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Matt Raible
            Reporter:
            Steve Tynor
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development