-
-
Notifications
You must be signed in to change notification settings - Fork 764
Getting java.lang.NoSuchMethodException when loading PageFactory elements in Java16+ #1575
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
UPD: the reason of this particular issue with Java 16 and 17 is in the following code:
It will add |
Thanks for checking this @ayuryev |
UPD2: but then new issue appears - since Java 9 there is more strict rules for encapsulation and especially in Java 17 it is not possible to access encapsulated modules from other libraries (AFAIK). It becomes an issue here in Appium Java Client with
It makes Appium incompatible with Java 17 by the moment. |
@mykola-mokhnach cglib (and probably other reflection issues) has to be resolved first I guess. Otherwise it will be hollow fix - it will not make Appium work for Java 17 |
cglib/cglib#191 - known issue
|
Please create a fork of this project and then you'd be able to create a PR from that fork. This is a safer approach. |
… AppiumByBuilder. [appium#1575](appium#1575)
… AppiumByBuilder. [appium#1575](appium#1575)
Fixed |
@mykola-mokhnach could you merge this fix into 7.6.x version? |
@margasan We currently aim to release version 8 and will only be supporting that one. Consider creating a custom fork if you'd like to continue using v7 |
@mykola-mokhnach Dear Mykola, we've faced with the similar problem on our project, it will be wonderful if it is possible to fix into 7 version. Thank you in advance. |
@mykola-mokhnach Is this available in current 8.0.0 Beta? I see the fix was done on Nov 5, but 8.0.0 Beta was released prior to that. If this is not available yet, when do you think the next Beta with the fix will be available? I'm just looking for a tentative date. Would be really helpful for me. |
We'd like to publish a new beta as soon as there is a new selenium lib patch available. See #1608 for more details |
So I tested 8.0.0 Beta 2 and I have got the same cglib error with Java JDK 17.0.1 which is the LTS. Am I missing something here? Please find the exception log below. I get this exception for Selenium's PageFactory.initElements(driver, this) command; java.lang.ExceptionInInitializerError |
Hi @mykola-mokhnach sorry for circling back to an old issue. We have an extensive usage of appium-java-client on our application, I'd say more than 1000 classes, and you could imagine the size of the effort is to upgrade to v8. We already tried and we bumped into some selenium issues, that we already reported, but we are held back on the java upgrade because of this specific issue. I know you're probably gonna say no, but doesn't hurt to ask, any chance this can be pulled into a patch fix for the 7.x? I've already talked to my stakeholders and keeping a fork is not an option. Thanks |
Hi @mykola-mokhnach Thanks |
its not working java 21 |
Description
Failed to switch to Java 17 due to issue with running Appium tests:
Java 16 also failed. Java 15 is OK.
Environment
The text was updated successfully, but these errors were encountered: