-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Analysis fails because field of TypeInfoImpl has type incompatible with proxy of XmlSeeAlso #2720
Comments
I just used I'm willing to help tackle this problem, but I'm not yet clear what would be productive and meaningful. |
Quarkus 1.9.1 was released, so I revisited this problem with GraalVM Version 20.2.0 (Java Version 11.0.8). This problem persists:
I'm still missing a sane approach to fixing, debugging or further analysing this problem. Suggestions are welcome! |
what is the status of this issue? |
My understanding of the issue is what can be perceived: GraalVM cannot compile XmlSeeAlso. There is no workaround. |
cstancu, do you have any idea to support this in graalvm? If yes, do you happen to know when? |
hi, we also looking at GraalVM but XML + JAXB is used a lot in our backend services. This issue blocking us from switching to GraalVm and Quarkus. Is there a workaround for this? |
hi, everyone! |
Same here |
This issue is still here when using graalvm 21.0 |
Can we please have an update on this issue? |
I include a simpleJaxb project which can reproduce this error constantly: |
This fixes the problem. But could it break something? @Adelrisk. Does this fix the problem for you as well? |
Seems to be fixed in the lastest version (graalvm 21.0.x and quarkus 1.13.7). I guess the issue can be closed |
@argenstijn are you sure ? because we have still the issue with cxf... |
I just see this PR : d72e67b#diff-5731194b93b5585f9ee61e07a1c72af18fd64a3a47dafcacb0fe155555b287ae |
so sadly other patch do not resolve it.
|
Ok, I share what I discover : the $$ProxyImpl is generated from AnnotationSubstitutionType.java and 1TypeMObject come from So it seems to be a graal internal type that is passed instead of orginal one. I have try to debug on jvm to see the type who arrive normaly and I have @javax.xml.bind.annotation.XmlSeeAlso(value={io.quarkiverse.cxf.deployment.test.Banana.class}) So this Proxy error is generated here : https://github.com/oracle/graal/blob/master/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGenerator.java Line 447 in 11477c2
|
Sorry, i am off for a few days. But in my case the error disappeared using the latest quarkus and graalvm version. |
the issue happend with quarkus 2.1.0-Final / quarkus 2.1.1-Final, GraalVM 21.2.0, quarkiverse cxf 0.9 |
Have same issue with GraalVM 21.1.0, 21.2.0, quarkus 1.13.2.Final, 1.13.7.Final, 2.1.1.Fianl |
hmm maybe it is related to jdk version. if it disapear for some people and not for other.
@argenstijn @rognew what is your jdk version ? |
Hi, I can reproduce it again with my simple test project. quarkus: 2.1.2.Final And it works again when i have the following replacement: @TargetClass(className = "com.sun.xml.bind.v2.model.impl.TypeInfoImpl", onlyWith = Target_com_sun_xml_bind_v2_model_impl_TypeInfoImpl.Selector.class)
} |
@dougxc @olpaw @christianwimmer , any ideas? |
I do not get how the substitute fix the issue because no method/field are substitute. So it mean it is just that when a substitution is there, it have no issue of type... we need a more simple reproducer.
|
I think I found the issue by looking for reproducer. it return the annotation without Locatable proxy so we can have an annotation with Locatable class and checkUniverse check that Type is consistent. because XML is a tree we have a call with returned value of LocatableAnnotation .create as parameter for next call... here checkUniverse must found an issue because type can be not consistent. Here you see it get Annotation from current class then cast it to Locatable for next leaf but it can return a non Locatable instance. So best is maybe do a substitution on LocatableAnnotation.create to throw exception if not succeed instead of returning source object. |
Dufoli, how can we get someone of graalvm look into this issue? @cstancu ? Can you please take a quick look! |
yes, that is weird but it helps somehow. |
Codrut is currently on vacation but will look at this after he returns. |
@argenstijn I cannot use your reproducible. When I run
If you can still reproduce this issue can you please make sure that the reproducible code is complete. @Adelrisk can you please provide reproducible code? |
@cstancu , see below: graalvm version: 21.2 mvn package -Pnative result: mvn package -Pnative com.oracle.svm.core.util.UserError$UserException: Field com.sun.xml.bind.v2.model.impl.TypeInfoImpl.upstream has declared type com.sun.x
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Field com.sun.xml.bind.v2.model.impl.TypeInfoImpl.upstream
[ReproducerIssue14652-0.1-runner:431] [total]: 43,652.11 ms, 5.09 GB Printing build artifacts to: /mnt/c/ontwikkel/git/infofolioproxyservicequarkus/target/ReproducerIssue14652-0.1-native-image-source-jar/ReproducerIssue14652-0.1-runner.build_artifacts.txt |
to make the reproducer working I ahve removed the Note reference in ReproduceHandler on my side. |
@argenstijn I can confirm the bug with your updated reproducer. The error message seems identical with the OP, the current error is here for clarity:
|
@dufoli The previous comment #2720 (comment) includes the updated reproducer |
Thank you for the reproducible code. The problem is that |
Describe the issue
While building a native image using quarkus the analysis stage fails with the reason:
In my project, I can only find
com.sun.xml.bind.v2.model.impl.TypeInfoImpl
in the jarorg.glassfish.jaxb:jaxb-runtime:jar:2.3.3-b02:compile
in my dependencies, which is only pulled in within the following top-level dependency:Even though I orient myself on #1178, I cannot track down the conflicting class in the graal codebase, or in my own. This part of this implementation of JAXB-API seems incompatible with graal.
Describe GraalVM and your environment:
More details
The text was updated successfully, but these errors were encountered: