attach
attach copied to clipboard
AndroidPushNotificationsService not usable
The AndroidPushNotificationsService is not usable because of a missing dependency. javax.json.Json
Compiler says:
[Mi. Mai 19 16:57:08 MESZ 2021][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
[Mi. Mai 19 16:57:11 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] classlist: 1,231.77 ms, 0.96 GB
[Mi. Mai 19 16:57:11 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] (cap): 98.44 ms, 0.96 GB
[Mi. Mai 19 16:57:12 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] setup: 1,320.34 ms, 0.96 GB
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] (clinit): 618.55 ms, 5.13 GB
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] (typeflow): 13,495.58 ms, 5.13 GB
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] (objects): 16,639.03 ms, 5.13 GB
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] (features): 1,462.55 ms, 5.13 GB
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26558] analysis: 33,188.51 ms, 5.13 GB
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Warning: Aborting stand-alone image build. com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.json.Json. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Detailed message:
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Trace:
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at parsing com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration(AndroidPushNotificationsService.java:97)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Call path from entry point to com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration():
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration(AndroidPushNotificationsService.java:95)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.register(AndroidPushNotificationsService.java:84)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at de.bsc.app.MainView.lambda$new$1(MainView.java:33)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at de.bsc.app.MainView$$Lambda$1325/0x00000007c1688c40.accept(Unknown Source)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.runtimeargs.impl.DefaultRuntimeArgsService.fire(DefaultRuntimeArgsService.java:51)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.runtimeargs.impl.AndroidRuntimeArgsService.processRuntimeArgs(AndroidRuntimeArgsService.java:45)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Lcom_gluonhq_attach_runtimeargs_impl_AndroidRuntimeArgsService_2_0002eprocessRuntimeArgs_00028Ljava_lang_String_2Ljava_lang_String_2_00029V(generated:0)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB]
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] com.oracle.svm.hosted.FallbackFeature$FallbackImageRequest: Aborting stand-alone image build. com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.json.Json. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Detailed message:
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Trace:
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at parsing com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration(AndroidPushNotificationsService.java:97)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Call path from entry point to com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration():
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration(AndroidPushNotificationsService.java:95)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.register(AndroidPushNotificationsService.java:84)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at de.bsc.app.MainView.lambda$new$1(MainView.java:33)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at de.bsc.app.MainView$$Lambda$1325/0x00000007c1688c40.accept(Unknown Source)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.runtimeargs.impl.DefaultRuntimeArgsService.fire(DefaultRuntimeArgsService.java:51)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.runtimeargs.impl.AndroidRuntimeArgsService.processRuntimeArgs(AndroidRuntimeArgsService.java:45)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Lcom_gluonhq_attach_runtimeargs_impl_AndroidRuntimeArgsService_2_0002eprocessRuntimeArgs_00028Ljava_lang_String_2Ljava_lang_String_2_00029V(generated:0)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB]
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.FallbackFeature.reportFallback(FallbackFeature.java:225)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:235)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:773)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:563)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.json.Json. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Detailed message:
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Trace:
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at parsing com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration(AndroidPushNotificationsService.java:97)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Call path from entry point to com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration():
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.readGoogleServicesConfiguration(AndroidPushNotificationsService.java:95)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.pushnotifications.impl.AndroidPushNotificationsService.register(AndroidPushNotificationsService.java:84)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at de.bsc.app.MainView.lambda$new$1(MainView.java:33)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at de.bsc.app.MainView$$Lambda$1325/0x00000007c1688c40.accept(Unknown Source)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.runtimeargs.impl.DefaultRuntimeArgsService.fire(DefaultRuntimeArgsService.java:51)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.gluonhq.attach.runtimeargs.impl.AndroidRuntimeArgsService.processRuntimeArgs(AndroidRuntimeArgsService.java:45)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Lcom_gluonhq_attach_runtimeargs_impl_AndroidRuntimeArgsService_2_0002eprocessRuntimeArgs_00028Ljava_lang_String_2Ljava_lang_String_2_00029V(generated:0)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB]
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:770)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] ... 8 more
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.json.Json. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.reportUnresolvedElement(SharedGraphBuilderPhase.java:286)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedType(SharedGraphBuilderPhase.java:242)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedMethod(SharedGraphBuilderPhase.java:268)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedInvoke(SharedGraphBuilderPhase.java:231)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1659)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1634)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5406)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3436)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3243)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1109)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1003)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:76)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:547)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
[Mi. Mai 19 16:57:45 MESZ 2021][INFO] [SUB] ... 5 more
[Mi. Mai 19 16:57:46 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] classlist: 884.07 ms, 0.96 GB
[Mi. Mai 19 16:57:47 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (cap): 351.43 ms, 0.96 GB
[Mi. Mai 19 16:57:48 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] setup: 1,235.35 ms, 0.96 GB
[Mi. Mai 19 16:57:56 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (clinit): 145.74 ms, 1.22 GB
[Mi. Mai 19 16:57:56 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (typeflow): 4,006.92 ms, 1.22 GB
[Mi. Mai 19 16:57:56 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (objects): 3,652.10 ms, 1.22 GB
[Mi. Mai 19 16:57:56 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (features): 200.00 ms, 1.22 GB
[Mi. Mai 19 16:57:56 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] analysis: 8,344.56 ms, 1.22 GB
[Mi. Mai 19 16:57:56 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] universe: 334.03 ms, 1.71 GB
[Mi. Mai 19 16:57:57 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (parse): 822.43 ms, 1.71 GB
[Mi. Mai 19 16:57:58 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (inline): 941.85 ms, 1.71 GB
[Mi. Mai 19 16:58:04 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] (compile): 5,326.98 ms, 2.35 GB
[Mi. Mai 19 16:58:04 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] compile: 7,429.52 ms, 2.35 GB
[Mi. Mai 19 16:58:05 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] image: 717.30 ms, 2.35 GB
[Mi. Mai 19 16:58:05 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] write: 112.81 ms, 2.35 GB
[Mi. Mai 19 16:58:05 MESZ 2021][INFO] [SUB] [de.bsc.app.testapp:26660] [total]: 19,161.99 ms, 2.35 GB
The --allow-incomplete-classpath option then gives me a simple NoClassDefFoundError for javax.json.Json during runtime.
If you need more information let me know. Thanks.
Have you checked the PushNotes sample? https://github.com/gluonhq/gluon-samples/tree/master/pushnotes See the dependencies: https://github.com/gluonhq/gluon-samples/blob/master/pushnotes/pom.xml
I don't remember exactly but I think I made it work by adding the following dependencies.
<dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>1.1.6</version> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>jakarta.json</artifactId> <version>1.1.6</version> </dependency>
I don't know why I needed two. I'm pretty sure I got one from checking out that sample you mentioned. But since I never commit anything into my own repos that is not necessary, I guess even with the dependency from the sample it didn't quite work. So I probably went on looking for a dependency where missing classes etc would be found.
Either way. Wouldn't it make more sense to define all needed dependencies directly in the attach module?