Here how i make it working (i just took your data so some can not be mandatory):
1) create a src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension containing the line: org.jboss.arquillian.persistence.core.container.RemotePersistenceExtension 2) create a file src/test/resources/arquillian.extension.persistence.properties with: defaultDataSeedStrategy = CLEAN_INSERT defaultDataSource = openejb:Resource/testDatabase dumpData = true 3) create a file src/test/resources/arquillian.extension.persistence.script.properties with: sqlStatementDelimiter = NEW_LINE 4) create a file src/test/resources/arquillian.extension.persistence.dbunit.properties with: caseSensitiveTableNames = true datatypeWarning = true defaultDataSetFormat = YAML datatypeFactory = org.dbunit.ext.hsqldb.HsqldbDataTypeFactory 5) create an empty src/test/resources/arquillian.extension.persistence.jpacacheeviction.properties now you don't need persistence stuff in arquillian.xml excepted one to activate it: <?xml version="1.0" encoding="UTF-8"?> <arquillian xmlns="http://jboss.com/arquillian" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <engine> <property name="deploymentExportPath">target/arquillian</property> </engine> <container default="true" qualifier="openejb-embedded-4"> <configuration> <property name="properties"> testDatabase = new://Resource?type=DataSource testDatabase.LogSql = true </property> </configuration> </container> <extension qualifier="persistence"> <property name="dumpData">true</property> <!-- just to activate it since we use properties file then --> </extension> </arquillian> 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 <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/9/4 dinabandhu <[email protected]> > 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 > <http://openejb.979440.n4.nabble.com/file/n4664976/arquillian.xml> > > persistence.xml > <http://openejb.979440.n4.nabble.com/file/n4664976/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: > http://openejb.979440.n4.nabble.com/Strange-error-NoClassDefFound-openejb-hsql-hibernate-arquillian-persistence-tp4664638p4664976.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
