tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <>
Subject Re: Strange error NoClassDefFound openejb+hsql+hibernate+arquillian-persistence
Date Wed, 04 Sep 2013 06:44:25 GMT
Here how i make it working (i just took your data so some can not be

1) create a
containing the line:


2) create a file
src/test/resources/ with:

defaultDataSeedStrategy = CLEAN_INSERT
defaultDataSource = openejb:Resource/testDatabase
dumpData = true

3) create a file
src/test/resources/ with:

sqlStatementDelimiter = NEW_LINE

4) create a file
src/test/resources/ with:

caseSensitiveTableNames = true
datatypeWarning = true
defaultDataSetFormat = YAML
datatypeFactory = org.dbunit.ext.hsqldb.HsqldbDataTypeFactory

5) create an empty

now you don't need persistence stuff in arquillian.xml excepted one to
activate it:

<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="" xmlns:xsi=""

    <property name="deploymentExportPath">target/arquillian</property>

  <container default="true" qualifier="openejb-embedded-4">
      <property name="properties">
        testDatabase = new://Resource?type=DataSource
        testDatabase.LogSql = true

  <extension qualifier="persistence">
    <property name="dumpData">true</property> <!-- just to activate it
since we use properties file then -->

then your test should work

Note: all this stuff is needed cause arquillian-persistence doesn't work
with embedded containers

*Romain Manni-Bucau*
*Twitter: @rmannibucau <>*
*Blog: ***<>
*LinkedIn: ***

2013/9/4 dinabandhu <>

> Still fighting :) ....
> I have got the exceptions resolved. I don't know what exactly was the
> problem ... I was trying many combinations and it eventually went away.
> However the @UsingDataSet annotations are still not inserting data into
> tables.
> I have moved from hsql to postgres database so that I can see what is
> happening at the database. Hibernate entity manager is working correctly
> with the database and data is being inserted by EM. But arquillian is not
> inserting data.
> The annotations are being processed as it complains if I specify a
> non-existing dataset name. But no data gets inserted into tables and I
> don't
> see any error messages.
> I have tried three different formats for dbunit datasource property,
> testdb,
> java:openejb/Resource/testDatabase and openejb:Resource/testDatabase and
> none of them work.
> I don't mind trying to debug a bit if I can get some pointer's on where to
> start.
> 1. Is there a way to enable detailed trace/debug log so that I can see what
> is happening when those annotations are processed.
> 2. If I have to start actual debugging where do I start ? I mean, where do
> I
> set my first break-points in arquillian persistence? How do I set the
> projects up so that I can debug into arquillian persistence code?
> I and also attaching the config files in case they give some clue.
> arquillian.xml
> <>
> persistence.xml
> <>
> Lastly, as an aside, I think any XML comments inside the "properties"
> configuration creates havoc. All property configurations from the comment
> onwards gets ignored. I don't know if this is the intended behavior, but it
> looks like a bug to me. Probably, the property parsing code considers only
> the first child text node of the property element while it should actually
> loop through all child text nodes. It has given me serious nightmares as
> the
> code seemed to change its behavior mysteriously and for no apparent reason.
> It was only yesterday that I realized the commenting/un-commenting of the
> properties I was doing is the reason for the apparently erratic behavior
> :).
> Again, I don't mind checking the code (and post a patch if I can sort it
> out) myself if you give me some pointers on where to look for it.
> Thanks & regards,
> Dinabandhu
> --
> View this message in context:
> Sent from the OpenEJB User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message