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: testAccountDeletion(org.ctjava.bean.TestAccountBean) Time elapsed: 0.117 sec 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)
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)

Presenting @ Oracle Code One 2019

I am presenting four sessions at Oracle Code one this year! I am also running a Hacking Jakarta EE at the Hackergarten Wednesday (1:00-2:30PM)

Monday @ 6:00 PM – Hacking the NetBeans Profiler (BOF) Moscone South – Room 305

The NetBeans Profiler is an open source profiler that is well written, modular, and incredibly easy to hack. In this BOF session, you’ll learn about the different features of this profiler and how you can build custom tools for analyzing heaps and profile applications. With custom command-line profiling tools, you can easily automate profiling as well as profile applications in remote production or cloud environments.

Wednesday @ 6:00 PM Practical MicroProfile with Java EE – Moscone South – Room 203

This session looks at how you can use theMicroProfileAPIs to turbocharge your existing Java EE application. The new APIs added in MicroProfileare available in both Payara and Open Liberty (Java EE containers). With both of these containers, you get both Java EE and MicroProfile. Even if you aren’t writing microservices, MicroProfilehas many exciting features to improve your existing applications.

Thursday

1:15 Advanced Topics in Modularization – Moscone South – Room 204

The Java platform now natively supports modularization. This session provides an update on tooling and takes an in-depth look at using services and module layers. It also covers best practices for project structure, publishing modules to a repository, and testing modular applications.

3:15 Polygot Java EE on GraalVM – Moscone South – Room 202

The new GraalVM supports multiple language including JavaScript, Python, Ruby, R, C++ as well as Java and other JVM languages. This opens up interesting possibilities for polygot enterprise applications. Now you can use a Node library in a Java application or call an R statistical function from an EJB. Previously, this type of integration was extremely challenging. This session will provide recipes to get up and running along with best practices and some cool demos.