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( 
 at org.yaml.snakeyaml.resolver.Resolver.(<br>at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer$1.(
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.createYamlReader(
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.produce(
 at org.dbunit.dataset.CachedDataSet.(<br>at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.(
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.(
 at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.(
%d bloggers like this: