I'm running into a very strange little problem. I've got a multi project
setup and the hsqldb driver appears to be getting lost

top/
 prj-a/
 prj-b/
 prj-c/

prj-a - basically pulls an extract from an oracle database and verifies
that it will be properly loaded into a Hypersonic DB.
prj-b - Leverages the data pulled in prj-a ... there is no direct
dependency on prj-a and really it should be a separate project from    
        the suite. prj-b calls the CLEAN_INSERT operation to populate
the dataset used during testing and fails as below.
prj-c - Leverages code in prj-b so needs to have the same dataset
gathered in prj-a.

prj-b and prj-c will fail if dbunit has been run prior to themselves for
whatever reason.

When executing the top level project build, I get the following error
when it reaches the second project that contains a reference to dbunit:
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [sql:execute {execution: default}]
> [INFO] Executing file: *************************************
> [INFO] 22 of 22 SQL statements executed successfully
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [dbunit:operation {execution: load-database}]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing database operation: CLEAN_INSERT
>
> Embedded error: org.hsqldb.jdbcDriver
When I turn on the -e switch I see the root cause as:
> Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
>         at
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:169)
>         at
> org.codehaus.mojo.dbunit.AbstractDbUnitMojo.createConnection(AbstractDbUnitMojo.java:159)
>         at
> org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:93)
>         ... 18 more
What I'm getting concerned about is that a class loader from the parent
is somehow hanging on to the reference to hsqldb causing it to get lost
some how.

Anyone have any thoughts on this.
-- 
David J. Graff
djgraff AT alltel DOT net
GPG Fingerprint: E407 6A73 0725 B2E0 995D AC21 705E 4D51 67C4 7499

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to