Quarkus: Upgrade Quarkus from 0.18.0 to 0.19.1

Created on 11 Jul 2019  路  4Comments  路  Source: quarkusio/quarkus

Describe the bug
I updated my Quarkus project from 0.18.0 to 0.19.1. And there are some regressions.
Starting the runtime failed, my unit tests too.

Expected behavior
(Describe the expected behavior clearly and concisely.)
The application was working fine (runtime and ut).

Actual behavior
(Describe the actual behavior clearly and concisely.)
Starting the runtime failed :
19:02:29,051 ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.ExceptionInInitializerError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:120)
at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:171)
at io.quarkus.dev.DevModeMain.main(DevModeMain.java:89)
Caused by: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl1.(ApplicationImpl1.zig:317)
... 8 more
Caused by: java.lang.ClassNotFoundException: io.fabric8.openshift.api.model.RouteStatus
at io.quarkus.runner.RuntimeClassLoader.findClass(RuntimeClassLoader.java:229)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at io.quarkus.runner.RuntimeClassLoader.loadClass(RuntimeClassLoader.java:166)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at io.quarkus.deployment.steps.HibernateValidatorProcessor$build14.deploy_0(HibernateValidatorProcessor$build14.zig:52)
at io.quarkus.deployment.steps.HibernateValidatorProcessor$build14.deploy(HibernateValidatorProcessor$build14.zig:9095)
at io.quarkus.runner.ApplicationImpl1.(ApplicationImpl1.zig:263)
... 8 more

19:02:29,052 ERROR [io.qua.dev.DevModeMain] Failed to start Quarkus, attempting to start hot replacement endpoint to recover
19:02:29,073 INFO [org.xnio] XNIO version 3.7.2.Final
19:02:29,085 INFO [org.xni.nio] XNIO NIO Implementation Version 3.7.2.Final

And my unit failed as well :
[ERROR] testHelloDenyAll Time elapsed: 0.002 s <<< ERROR!
org.junit.jupiter.api.extension.TestInstantiationException:
TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [fr.csn.caf.it.rest.TokenSecuredResourceTest]: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#build threw an exception: io.quarkus.deployment.configuration.ConfigurationError: Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:
- org.hibernate.engine.spi.ManagedEntity
- org.hibernate.engine.spi.ManagedMappedSuperclass
- org.hibernate.engine.spi.PersistentAttributeInterceptable
- org.hibernate.engine.spi.SelfDirtinessTracker
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.

To Reproduce
Steps to reproduce the behavior:

  1. ./mvnw compile quarkus:dev
  2. ./mvnw test

Environment (please complete the following information):

  • Output of uname -a or ver:
    Darwin macbook-pro-de-colonel-d 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
  • Output of java -version:
    java version "11.0.3" 2019-04-16 LTS
    Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
    Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)
  • GraalVM version (if different from Java): N/A
  • Quarkus version or git rev: 0.19.1

Additional context
I solved the problem by adding a library to my pom :

io.fabric8
kubernetes-client
4.3.0

below the dependencies of my project :


io.fabric8
kubernetes-client
4.3.0


io.quarkus
quarkus-resteasy


io.quarkus
quarkus-hibernate-orm



io.quarkus
quarkus-hibernate-orm-panache


io.quarkus
quarkus-hibernate-validator


io.quarkus
quarkus-undertow


io.quarkus
quarkus-swagger-ui


io.quarkus
quarkus-kubernetes


io.quarkus
quarkus-smallrye-rest-client


io.quarkus
quarkus-resteasy-jsonb


io.quarkus
quarkus-smallrye-openapi


io.quarkus
quarkus-jdbc-h2


com.h2database
h2
runtime


io.quarkus
quarkus-jdbc-mariadb


io.quarkus
quarkus-junit5
test


io.rest-assured
rest-assured
test


com.nimbusds
nimbus-jose-jwt
${nimbus-jose-jwt.version}


io.quarkus
quarkus-smallrye-jwt
test


com.fasterxml.jackson.core
jackson-databind
test

The application is now working like when i was in quarkus 0.18.0

kinbug triaginvalid

All 4 comments

Solved by adding io.fabric8:kubernetes-client:4.3.0

Let's try to understand what's going on.

I'll take a look, @elamotte7 can you please supply a reproducer project?

Asking because I just tried 0.19.1 on an example application with the kubernetes-client extension and it worked just fine

Yeah, now that I read this with more attention, I think he tried to use kubernetes-client directly without using the extension and that didn't work well.

Using the extension did set up everything right and it then fixed the issue.

Closing.

Was this page helpful?
0 / 5 - 0 ratings