Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus with vaadin-quarkus-extension fails on native compilation #45315

Closed
DrHackschnitzel opened this issue Dec 30, 2024 · 2 comments
Closed
Labels
area/native-image kind/bug Something isn't working kind/bug-thirdparty Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.

Comments

@DrHackschnitzel
Copy link

DrHackschnitzel commented Dec 30, 2024

Describe the bug

when compiling a quarkus app with the extension vaadin-quarkus-extension (vaadin flow) it fails with errors

Expected behavior

It should compile in native mode

Actual behavior

it fails with the following error:

ERROR [osh.sof.os.lin.LinuxOperatingSystem] Did not JNA classes. Investigate incompatible version or missing native dll.
[2/8] Performing analysis...  []                                                                         (9,4s @ 1,63GB)
   13.264 reachable types   (84,4% of   15.718 total)
   17.772 reachable fields  (56,3% of   31.547 total)
   63.884 reachable methods (53,3% of  119.964 total)
    4.114 types,   110 fields, and 3.349 methods registered for reflection

Error: Class initialization of oshi.software.os.unix.freebsd.FreeBsdOperatingSystem failed. This error is reported at image build time because class oshi.software.os.unix.freebsd.FreeBsdOperatingSystem is registered for linking at image build time by command line and command line. Use the option 

    --initialize-at-run-time=oshi.software.os.unix.freebsd.FreeBsdOperatingSystem

 to explicitly request initialization of this class at run time.
com.oracle.svm.core.util.UserError$UserException: Class initialization of oshi.software.os.unix.freebsd.FreeBsdOperatingSystem failed. This error is reported at image build time because class oshi.software.os.unix.freebsd.FreeBsdOperatingSystem is registered for linking at image build time by command line and command line. Use the option 

    --initialize-at-run-time=oshi.software.os.unix.freebsd.FreeBsdOperatingSystem

When i got this right, it fails with all implementations of the abstract class oshi.software.common.AbstractOperatingSystem

The dependency (oshi-core) comes with

[INFO] +- com.vaadin:vaadin-quarkus-extension:jar:24.6.0:compile
[INFO] |  +- com.vaadin:vaadin-core:jar:24.6.0:compile
[INFO] |  |  +- com.vaadin:vaadin-core-internal:jar:24.6.0:compile
[INFO] |  |  \- com.vaadin:vaadin-dev:jar:24.6.0:compile
[INFO] |  |     +- com.vaadin:vaadin-dev-server:jar:24.6.0:compile
[INFO] |  |     |  +- com.vaadin:license-checker:jar:1.13.3:compile
[INFO] |  |     |  |  +- com.github.oshi:oshi-core:jar:6.6.5:compile

the quarkus build uses the following native image builder
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21

How to Reproduce?

Steps to reproduce:

  1. Goto https://code.quarkus.io/ and select vaadin Flow
  2. Generate,Download and extract the Application
  3. Build it with native mode: ./mvnw clean package -Pproduction,native

Output of uname -a or ver

Linux arch 6.12.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 19 Dec 2024 21:29:01 +0000 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.5" 2024-10-15 OpenJDK Runtime Environment (build 21.0.5+11) OpenJDK 64-Bit Server VM (build 21.0.5+11, mixed mode, sharing)

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.17.5

Build tool (ie. output of mvnw --version or gradlew --version)

apache-maven-3.9.9

Additional information

No response

@DrHackschnitzel DrHackschnitzel added area/native-image kind/bug Something isn't working labels Dec 30, 2024
Copy link

quarkus-bot bot commented Dec 30, 2024

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel,native-image)

@geoand
Copy link
Contributor

geoand commented Dec 31, 2024

Thanks for the report!

I suggest reporting this to Quarkus Vaadin extension repository as this (core) repository have no support for Vaadin

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2024
@geoand geoand added the kind/bug-thirdparty Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus. label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working kind/bug-thirdparty Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.
Projects
None yet
Development

No branches or pull requests

2 participants