cancel
Showing results for 
Search instead for 
Did you mean: 
  • 1,161 Views

How to get the DO378 Labs Work

I just spent a couple hours troubleshooting this so I wanted to share my experience.

The Lab environment for DO378 comes with Java JDK 11, VSCodium, and the Language Support for Java(TM) by Red Hat extension installed and enabled in VSCodium. When I started up VSCodium the Language Support extension updated to v1.9.0. Version v1.9.0 of the extension requires Java 17.

To install Java 17 I went to: https://access.redhat.com/labs/rhpc/ to get the 479.pem file and followed the instructions on the page to install it. Then I used subscription-manager to register and enable the repo rhel-8-for-x86_64-appstream-rpms which allowed me to run yum install java-17-openjdk-devel. Which got Java 17 installed. And made the Language Support for Java extension stop complaining about not having Java 17.

Then, when I was trying to run tests from VSCodium I kept getting this error:

java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
 [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#enhancerDomainObjects threw an exception: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class io.quarkus.hibernate.orm.panache.PanacheEntity

The solution was to add the following lines to the file settings.json in VSCodium by clicking View->Command Palette...->Preferences: Open Settings (JSON) and then configuring the java.configuration.runtimes property with:

    "java.configuration.runtimes": [
        {
          "name": "JavaSE-11",
          "path": "/usr/lib/jvm/java-11-openjdk/",
        },
        {
          "name": "JavaSE-17",
          "path": "/usr/lib/jvm/java-17-openjdk/",
          "default": true
        },
      ]

The readme for the Language Support for Java extension has details on how to configure that setting. It just wasn't immediately apparent from the error message that this was the problem so I'm sharing here. After doing those two things I was able to run the labs.

Labels (1)
0 Replies
Join the discussion
You must log in to join this conversation.