-
Notifications
You must be signed in to change notification settings - Fork 112
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
3 EJB30 test failures in Platform TCK 8.0.2 when run in JDK11+ #1194
Comments
I am unable to reproduce this on WFLY with similar test so take the information below with a pinch of salt as I am unable to debug it. @alwin-joseph what's your implementation of Apart from this, the scenario occurs only because the EJB bean uses |
WFLY was running in JDK11+? JDK11/17 is where the issue is reproduced for WLS.
Yes org.jboss.weld.bean.proxy.util.WeldDefaultProxyServices is being used here. Will you be able to point me to the implementation of `ProxyServices in WFLY (https://github.com/wildfly/wildfly?) . |
Yes, that version of Weld still had to use MR JAR release so you need JDK 11+ to have access to JPMS and modular approach to class defining via
The main difference between classical
Here is a link to the current version which is for Weld 5, but it's very similar. |
createCompoundProxyName is invoked with below parameters
The proxyPackage of the bean is set(incorrectly for this scenario) here in the first iteration.
Hence this line sets the proxyPackage after obtaining the package name of AnnotatedLocalBusinessInterface1 from this map. From the logs I see that the map does have all the 3 interfaces and the bean class correctly populated, no issue with that. So effectively the bean gets the proxyPackage of interface. |
Yes, I am aware of all that. However, for some other cases, this behavior as desired as described in https://issues.redhat.com/browse/WELD-2666 (and the linked PR) which introduced this bit of code.
This isn't necessarily wrong, note that if you define classes with plain I am trying to figure out a way to change the package of this proxy only for this particular case - so far my investigation indicates that this happens purely for EJB beans declaring a |
FYI I have created a PR draft that attempts to fix this - weld/core#2895 |
I see the PR with fix is merged. Thanks a lot for working on this. I was looking at the prospects of extending this fix to WELD versions 3 & 4 (weld-core-impl jar). As you clarified earlier,
are there any conditions which if satisfied can trigger updates in non-active versions(3&4). In other option, should we be mindful of anything If we decide to fork the weld/core repo and apply the fix in the PR. I was thinking to do as below in the order
|
Note that you can still implement your own
There aren't any formal conditions for this. Jakarta EE 8 is now 4 years ago and JDK 11 is 5y.
Yes, you could do that. |
It was suggested not to use this approach for this release.
I think this issue might have started after introducing impl/src/main/java11/org/jboss/weld/bean/proxy/util/WeldDefaultProxyServices.java 2 years back in 3.1 ; weblogic would have been using an older version of WELD before that.
Thanks! We will do this. |
Closing this as the fix is provided in weld. Thanks much @manovotn! Appreciate your help. |
Describe the bug
Below 3 tests in JakartaEE8 Platform TCK are failing on JDK11+
com/sun/ts/tests/ejb30/lite/view/equals/Client.java#singletonEquals_from_ejbembed
com/sun/ts/tests/ejb30/lite/view/equals/Client.java#statefulEquals_from_ejbembed
com/sun/ts/tests/ejb30/lite/view/equals/Client.java#statelessEquals_from_ejbembed
TCK Bundle : https://www.eclipse.org/downloads/download.php?file=/jakartaee/platform/8/jakarta-jakartaeetck-8.0.2.zip
JDK versions: JDK 11, JDK 17
Implementation being tested : Weblogic Server 14.1.2
Weld Jar/Version used: 3.1.9.Final (https://mvnrepository.com/artifact/org.jboss.weld/weld-core-impl/3.1.9.Final)
Test Log:
Additional context
Moving 3 interfaces com.sun.ts.tests.ejb30.common.busiface.AnnotatedLocalBusinessInterface1, BusinessLocalIF1 and BusinessLocalIF2 to com.sun.ts.tests.ejb30.lite.view.equals package in the TCK will let the tests pass.
From printing the logs in weld jar it seems like weld gets the proxyPackage of the Session bean [class com.sun.ts.tests.ejb30.lite.view.equals.StatelessEqualsBean incorrectly as com.sun.ts.tests.ejb30.common.busiface (the package of the interface). A hardcoded fix to correct the package for this Session bean by using proxyPackage = bean.getBeanClass().getPackage().getName() (similar to https://github.com/WELD-2758 Proxies for non-public class-based beans should reside in bean's package if possible weld/core#2886) let the tests pass. But not sure which should be the right set of conditions where the proxyPackage needs to be modified.
cc @manovotn Would you be able to comment please.
I should be able to add and print logs in the weld jars if that is helpful.
Embeddable EJB Application ejbembed_vehicle_ejb.jar(bundled with platform TCK 8.0.2) is being used for this test.
unzip ejbembed_vehicle_ejb.jar
The text was updated successfully, but these errors were encountered: