Java 11 on 1.3.0.Final

215 views
Skip to first unread message

Cristiano Nicolai

unread,
Mar 22, 2020, 11:34:18 PM3/22/20
to Quarkus Development mailing list
Hi all,

I've two Quarkus application that are failing when I try to use the runner jar with Java 11. When running on Java 8, it works fine.

openjdk version "11.0.5"

See stacktrace below:

java -jar data-index-service-0.8.1-runner.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:27)
Caused by: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:410)
... 1 more
Caused by: java.lang.RuntimeException: Failed to initialize Arc
at io.quarkus.arc.Arc.initialize(Arc.java:26)
at io.quarkus.arc.runtime.ArcRecorder.getContainer(ArcRecorder.java:35)
at io.quarkus.deployment.steps.ArcProcessor$generateResources61.deploy_0(ArcProcessor$generateResources61.zig:53)
at io.quarkus.deployment.steps.ArcProcessor$generateResources61.deploy(ArcProcessor$generateResources61.zig:404)
at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:388)
... 1 more
Caused by: java.lang.RuntimeException: Error checking value of member method since on interface java.lang.Deprecated
at javax.enterprise.util.AnnotationLiteral.invoke(AnnotationLiteral.java:291)
at javax.enterprise.util.AnnotationLiteral.getMemberValue(AnnotationLiteral.java:276)
at javax.enterprise.util.AnnotationLiteral.hashCode(AnnotationLiteral.java:246)
at java.base/java.util.HashMap.hash(HashMap.java:339)
at java.base/java.util.HashMap.put(HashMap.java:607)
at java.base/java.util.HashSet.add(HashSet.java:220)
at io.smallrye.reactive.messaging.extension.MediatorManager_Bean.<init>(MediatorManager_Bean.zig:385)
at io.quarkus.arc.setup.Default_ComponentsProvider.addBeans2(Default_ComponentsProvider.zig:328)
at io.quarkus.arc.setup.Default_ComponentsProvider.getComponents(Default_ComponentsProvider.zig:43)
at io.quarkus.arc.impl.ArcContainerImpl.<init>(ArcContainerImpl.java:103)
at io.quarkus.arc.Arc.initialize(Arc.java:20)
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.enterprise.util.AnnotationLiteral.invoke(AnnotationLiteral.java:288)
... 15 more
Caused by: java.lang.AbstractMethodError: Receiver class io.quarkus.arc.generatorDeprecated_Shared_AnnotationLiteral does not define or inherit an implementation of the resolved method 'abstract java.lang.String since()' of interface java.lang.Deprecated.
... 20 more


--
Best regards,

Cristiano Nicolai

Stuart Douglas

unread,
Mar 22, 2020, 11:54:58 PM3/22/20
to cristian...@gmail.com, Quarkus Development mailing list
Are you building on Java 8 and running on Java 11?

Stuart

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAOVo6cQJbmBGBY7bV91%3DGoiBBPE5Po0OiMmfwGfz7u%2BmDuSM6w%40mail.gmail.com.

Cristiano Nicolai

unread,
Mar 23, 2020, 12:37:40 AM3/23/20
to Stuart Douglas, Quarkus Development mailing list
Correct.

Stuart Douglas

unread,
Mar 23, 2020, 1:06:29 AM3/23/20
to Cristiano Nicolai, Martin Kouba, Quarkus Development mailing list
We have seen these sort of bugs before, where there are differences between JDK11 and JDK8, sometimes we can fix them but in general the best advice is to use the same JVM for building and running (maybe we should add a warning if they don't match).

@Martin Kouba why is this literal being generated anyway? I would not have thought we would need an annotation literal for Deprecated.

Stuart

Martin Kouba

unread,
Mar 23, 2020, 4:38:42 AM3/23/20
to Stuart Douglas, Cristiano Nicolai, Quarkus Development mailing list
Dne 23. 03. 20 v 6:06 Stuart Douglas napsal(a):
> We have seen these sort of bugs before, where there are differences
> between JDK11 and JDK8, sometimes we can fix them but in general the
> best advice is to use the same JVM for building and running (maybe we
> should add a warning if they don't match).
>
> @Martin Kouba <mailto:mko...@redhat.com> why is this literal being
> generated anyway? I would not have thought we would need an annotation
> literal for Deprecated.

Sometimes we need to collect all annotations of a java member, i.e. when
an injection point resolves to a dependent bean that injects
InjectionPoint metadata (and we need to simulate the result of
InjectionPoint#getAnnotated()).

In this particular case, it's very likely this injection point:
https://github.com/smallrye/smallrye-reactive-messaging/blob/master/smallrye-reactive-messaging-provider/src/main/java/io/smallrye/reactive/messaging/extension/MediatorManager.java#L75-L78

It's @Deprecated and the producer that is resolved for this IP does
inject the InjectionPoint metadata.

I'm not so sure how to fix this properly because we can't just simulate
InjectionPoint#getAnnotated() with reflection at runtime because it
should be the final set of annotations (possibly different from the
original set).

>
> Stuart
>
> On Mon, 23 Mar 2020 at 15:37, Cristiano Nicolai
> <cristian...@gmail.com <mailto:cristian...@gmail.com>> wrote:
>
> Correct.
>
> On Mon, Mar 23, 2020 at 1:54 PM Stuart Douglas <sdou...@redhat.com
> <mailto:sdou...@redhat.com>> wrote:
>
> Are you building on Java 8 and running on Java 11?
>
> Stuart
>
> On Mon, 23 Mar 2020 at 14:34, Cristiano Nicolai
> <cristian...@gmail.com
> <mailto:quarkus-dev...@googlegroups.com>.
> <https://groups.google.com/d/msgid/quarkus-dev/CAOVo6cQJbmBGBY7bV91%3DGoiBBPE5Po0OiMmfwGfz7u%2BmDuSM6w%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Best regards,
>
> Cristiano Nicolai
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic

Reply all
Reply to author
Forward
0 new messages