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
JDK8u60 breaks CDI Injection #407
Comments
Is that all I need to reproduce a war with the above class in or do I need to know what the Event generator code to go with this is? Even better would be a simple test application on GitHub we could use to investigate. |
That is the only class you need. It doesn't deploy when compiled with JDK8u60. I used netbeans and created a Maven -> Web Application project. That is the only class in the project. |
Here's the full project I used: https://github.com/mamboking/jdk8u60_cdi_test |
Is it compiled with the -parameters flag? |
No, it is not. |
Sorry I hadn't compiled the war on JDK8u60. I can now reproduce the issue |
We had discovered this same issue too, see this: http://lists.jboss.org/pipermail/cdi-dev/2015-August/007139.html and http://mail.openjdk.java.net/pipermail/compiler-dev/2015-August/009766.html |
Getting same issues with GlassFish 4.1, Payara 4.1.153, wildfly-9.0.1.Final, Wildly wildfly-10.0.0.Beta2 Payara 4.1.153 remote failure: Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers @default
GlassFish 4.1 remote failure: Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers @default
Wildfly wildfly-9.0.1.Final Unexpected HTTP response: 500 Request Response Internal Server Error
Wildly wildfly-10.0.0.Beta2 Unexpected HTTP response: 500 Request Response Internal Server Error
|
This is the only thing that is added by u60 when compared to u51 bytecode: 205a206
> 0 36 0 someString Ljava/lang/String;
206a208,211
> RuntimeVisibleParameterAnnotations:
> parameter 0:
> 0: #34()
> parameter 1: |
@mamboking yes, that 's indeed the only change. I diffed the output of a number of variants, and only that changed every time. I also checked on TomEE 7.0-snapshot (apache-tomee-7.0.0-20150518.041133-5-plus.zip) which uses OWB instead of Weld (OWB version 1.6.0-SNAPSHOT) and this one did not seem to have any issues with the U60 compiled war. |
I agree the problem is as you describe in your email to the JDK list @arjantijms. The synthetic method is now a valid event observer method but the second parameter has no matching producer. If you did have a matching producer/bean and it deployed correctly I suppose all sort of weirdness could happen. |
Issue raised in JIRA |
https://issues.jboss.org/browse/WELD-2019 just got resolved. Does Payara plan to release a hotfix for 4.1.153 (likely together with #377)? |
Once they are both out to Maven central we will incorporate them into the Payara build and close the two issues. Latest builds are always downloadable from http://www.payara.co.uk/upstream_builds |
payara test please |
FISH-666 FISH-1069 FISH-1416 FISH-1504 FISH-1526 MicroProfile 4.0
JDK8u60 is adding a RuntimeVisibleParameterAnnotations section to the compiled bytecode for lambdas. JDK8u51 did not add that section. This is causing failures when trying to deploy my project.
Test Class:
Error:
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers @default
at injection point [BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedMethod] private static com.lairdlink.lib.cdilambda.CDITest.CDITest.lambda$foo$0(@observes String, String)
at com.lairdlink.lib.cdilambda.CDITest.CDITest.lambda$foo$0(CDITest.java:0)
WELD-001475: The following beans match by type, but none have matching qualifiers:
The text was updated successfully, but these errors were encountered: