[arquillian-issues] [JBoss JIRA] (ARQ-1299) Persistence extension throws NPE with empty table DataSets

Noah White (JIRA) jira-events at lists.jboss.org
Thu Feb 14 13:26:57 EST 2013


Noah White created ARQ-1299:
-------------------------------

             Summary: Persistence extension throws NPE with empty table DataSets
                 Key: ARQ-1299
                 URL: https://issues.jboss.org/browse/ARQ-1299
             Project: Arquillian
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Extension - Persistence
    Affects Versions: persistence_1.0.0.Alpha5
         Environment: JDK 1.7.0_03 x64 / Windows 7 x64 / Arquillian 1.0.1 / DBUnit 2.4.9 / Snakeyaml 1.11 / Glassfish 3.1.2 / Arquillian GF remote container 1.0.0CR3
            Reporter: Noah White
            Assignee: Bartosz Majsak


I have a Arq Persistence Ext test method which loads YAML formatted data using @DataSet.

In the data file I have a mix of tables with data and 'empty' tables. The empty tables are specified to facilitate their cleaning as they contain data created during the test and affect referential FK constraints.

DBUnit provides for specifying an empty table w/YAML like so where you simply specify the table name and a colon like so:

MY_EMPTY_TABLE_1:

MY_EMPTY_TABLE_2:

When I do that I get the following NPE as it appears Arq persistence dbunit does not do a NULL check when it extracts the columns:

{code:java}
Caused by: java.lang.NullPointerException
	at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.extractColumns(YamlDataSetProducer.java:139)
	at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.createTables(YamlDataSetProducer.java:119)
	at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.produce(YamlDataSetProducer.java:74)
	at org.dbunit.dataset.CachedDataSet.<init>(CachedDataSet.java:97)
	at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:60)
	at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:85)
	at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:80)
	at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.loadYamlDataSet(DataSetBuilder.java:92)
	at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.build(DataSetBuilder.java:65)
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list