Arquillian Persistence Extension and Payara 5

Recently I ran into trouble using Arquillian Persistence Extension with Payara. Embedded tests were failing with the exception below. Basically, there was a mismatch between the SnakeYAML library used by Payara and the one used by the Arquillian Persistence Extension. Arquillian Persistence Extension uses an old version whereas Payara is using a relatively recent release (multi-year gap). Trying to force the old version didn’t work.

To solve this problem, I built Arquillian Persistence Extension from source and installed it in my local nexus repository. The code checked into the repo contains a dependency on a newer version of SnakeYML. Hopefully at some point a build will be generated and pushed to Maven Central so this isn’t a problem.

Exception:<br>testAccountDeletion(org.ctjava.bean.TestAccountBean) Time elapsed: 0.117 sec &lt;&lt;&lt; ERROR! java.lang.NoSuchFieldError: VALUE 
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer$1.addImplicitResolvers(YamlDataSetProducer.java:116) 
 at org.yaml.snakeyaml.resolver.Resolver.(Resolver.java:73)<br>at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer$1.(YamlDataSetProducer.java:105)
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.createYamlReader(YamlDataSetProducer.java:103)
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.produce(YamlDataSetProducer.java:78)
 at org.dbunit.dataset.CachedDataSet.(CachedDataSet.java:97)<br>at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.(YamlDataSet.java:60)
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.(YamlDataSet.java:85)
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.(YamlDataSet.java:80)
%d