On 5/15/07, Steve Tynor <[EMAIL PROTECTED]> wrote:
I'm testing appfuse 2.0-m5-snapshot. I am using hsqldb for unit testing
with the following substitution for mysql at the bottom of the pom.xml:

 > <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
 >
<dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory</dbunit.dataTypeFactoryName>
 > <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:ascent;shutdown=true]]></jdbc.url>
 > <jdbc.username>sa</jdbc.username>
 > <jdbc.password></jdbc.password>

This worked fine until I started playing with war:inplace, and copying
some files from the appfuse sources, etc.

   [Matt: please add my vote to those that want a way to have
    all the appfuse related classes, resource files, etc. included
    into my source directory (as in Equinox and Appfuse 1.x) I'm
    finding it quite tedious and error prone to copy files out of
    the sources and to create a pom.xml that recreates all the
    proper dependencies but without dependencies on the appfuse
    jar/war's].

In anycase, after all my machinations, "mvn -e clean test" works (all 57
junit tests pass), _except_ right at the end, I get the following
problem from the hsqldb driver -- googling shows that this used to be
fixable by calling SHUTDOWN.  I'm not a maven expert, so I'm not sure
how I can make that happen with the new Maven framework.  Can someone help?

The fact that you have ;shutdown=true in your jdbc.url should handle
this.  It also might be related to the following issue:

http://jira.codehaus.org/browse/MOJO-673

Have you tried using H2?

Matt


Thanks!
Steve

---------------------
...
Results :
[surefire] Tests run: 57, Failures: 0, Errors: 0

[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:
[EMAIL PROTECTED]
=C:\newdev\myapp\trunk-exploded\myapp.lck, exists=true, locked=false,
valid=false, fl =null]: java.lang.Exception:  java.io.IO
Exception: The process cannot access the file because another process
has locked
  a portion of the file : C:\newdev\myapp\trunk-exploded\myapp.lck
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
database
  operation: CLEAN_INSERT
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
executing datab
ase operation: CLEAN_INSERT
         at
org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:110
)
         at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
         ... 16 more
Caused by: java.sql.SQLException: The database is already in use by
another proc
ess: [EMAIL PROTECTED]
=C:\newdev\myapp\trunk-explod
ed\myapp.lck, exists=true, locked=false, valid=false, fl =null]:
java.lang.Exce
ption:  java.io.IOException: The process cannot access the file because
another
process has locked a portion of the file :
C:\newdev\myapp\trunk-exploded\ascent.lck
         at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
         at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
         at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
         at org.hsqldb.jdbcDriver.connect(Unknown Source)
         at
org.codehaus.mojo.dbunit.AbstractDbUnitMojo.createConnection(Abstract
DbUnitMojo.java:169)
         at
org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:93)

         ... 18 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 29 seconds
[INFO] Finished at: Tue May 15 19:38:22 EDT 2007
[INFO] Final Memory: 30M/54M
[INFO]
------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to