Arquillian-persistence-extension dbunit - Unable to load Arquillian properties in Container. Missing file arquillian.extension.persistence.properties
ziti Jun 30, 2014 8:13 AMHey there,
my environment is the following:
Glassfish (managed) running on localhost.
Eclipse IDE running on localhost containing source / test code.
My arquillian.xml looks like:
<?xml version="1.0"?> <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian" xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <engine> <property name="deploymentExportPath">C:/dev/deployments</property> </engine> <extension qualifier="persistence"> <property name="defaultDataSource">jdbc/ne-local</property> <property name="defaultTransactionMode">COMMIT</property> <property name="defaultCleanupPhase">NONE</property> <property name="defaultDataSeedStrategy">CLEAN_INSERT</property> </extension> <extension qualifier="persistence-dbunit"> <property name="schema">it</property> <property name="defaultDataSetLocation">dbunit/</property> <property name="resultSetTableFactory">org.dbunit.database.ForwardOnlyResultSetTableFactory</property> <property name="datatypeFactory">org.dbunit.ext.oracle.Oracle10DataTypeFactory</property> </extension> <container qualifier="IT" default="true"> <configuration> <property name="domain">it</property> <property name="adminPort">4848</property> <property name="adminHost">localhost</property> <property name="adminUser">user</property> <property name="adminPassword">adminPWD</property> <property name="allowConnectingToRunningServer">true</property> </configuration> </container> </arquillian>
I have a test class like:
@RunWith(Arquillian.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class MyTestClassIT { @Deployment public static EnterpriseArchive deploy() { EnterpriseArchive microEar = Maven.configureResolver().workOffline() .resolve("server-platform:my.company.myproject.frm.svr.ear:ear:1.0.0-SNAPSHOT").withoutTransitivity() .asSingle(EnterpriseArchive.class); JavaArchive tests = ShrinkWrap.create(JavaArchive.class) .addClass(MyTestClassIT.class) microEar.addAsLibrary(tests); return microEar; } // Some injections, logins and so on... @Test @Transactional @UsingDataSet("TestDataSet.xml") public void testCompareDataToDB() { /* ... testcode ... */ } }
My maven pom.xml contains arquillian-persistence-core / arquillian-persistence-dbunit / arquillian-persistence-api and arquillian-persistence-spi in version alpha7.
And I included dbUnit-2.5.0
Arquillian version 1.1.5.Final
When I run my test I always get a:
PersistenceExtensionInitializationException: Unable to load Arquillian properties in Container. Missing file arquillian.extension.persistence.properties at ConfigurationImporter.loadFromPropertyFile(ConfigurationImporter.java:80) ... Caused by: java.lang.NullPointerException
In the deployment I can't find this property file.
Did I miss something? How / when is this file generated?
How can I include this?
Thanks in advance!
Timo