You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ExceptionI while trying to Initialise Page factory with Java client 6.0.0 #949
Please create a gist with pasted stacktrace of exception thrown by java.
java.lang.ExceptionInInitializerError
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:52)
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:33)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.proxyForAnElement(AppiumFieldDecorator.java:217)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.access$0(AppiumFieldDecorator.java:215)
at io.appium.java_client.pagefactory.AppiumFieldDecorator$1.proxyForLocator(AppiumFieldDecorator.java:107)
at org.openqa.selenium.support.pagefactory.DefaultFieldDecorator.decorate(DefaultFieldDecorator.java:62)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.decorate(AppiumFieldDecorator.java:155)
at org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:113)
at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105)
at com.greatWest.pageObject.LoginPage.(LoginPage.java:82)
changed the title [-]PageFactory.initElements(new AppiumFieldDecorator(driver, this)[/-][+]ExceptionI while trying to Initialise Page factory with Java client 6.0.0[/+]on Jun 19, 2018
@Siddh010 Even I am facing the same issue. Have implemented page factory model in the project but exception occurs the moment my class get initialized.
I have updated the selenium-server, selenium-java to Version 3.13 and my appium java-client to Version 6.1.0. Appium 1.8.1 is being used.
hi guys please help me . i'm getting this exception
i'm using java client 8.2.0
java.lang.ExceptionInInitializerError
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:52)
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:33)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.proxyForAnElement(AppiumFieldDecorator.java:217)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.access$0(AppiumFieldDecorator.java:215)
at io.appium.java_client.pagefactory.AppiumFieldDecorator$1.proxyForLocator(AppiumFieldDecorator.java:107)
at org.openqa.selenium.support.pagefactory.DefaultFieldDecorator.decorate(DefaultFieldDecorator.java:62)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.decorate(AppiumFieldDecorator.java:155)
at org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:113)
at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105)
at com.greatWest.pageObject.LoginPage.(LoginPage.java:82)
Activity
[-]PageFactory.initElements(new AppiumFieldDecorator(driver, this)[/-][+]ExceptionI while trying to Initialise Page factory with Java client 6.0.0[/+]Siddh010 commentedon Jun 26, 2018
Remove maven dependency for selenium WebDriver and started working.
Internally Java-client now call selenium webdriver..
narendra-chandratre commentedon Aug 7, 2018
@sidd' But I am not using Selenium WebDriver as dependancy :(
kapilsuri87 commentedon Sep 18, 2018
@Siddh010 Even I am facing the same issue. Have implemented page factory model in the project but exception occurs the moment my class get initialized.
I have updated the selenium-server, selenium-java to Version 3.13 and my appium java-client to Version 6.1.0. Appium 1.8.1 is being used.
Any help would be appreciated.
jpita commentedon Sep 19, 2018
@narendra-chandratre @kapilsuri87 check if you're using cucumber (cukes).
I solved it by removing that dependency
kapilsuri87 commentedon Sep 19, 2018
@jpita : Please confirm if you want me to update all cucumber dependencies from "info.cukes" to "io.cucumber" dependencies??
jpita commentedon Sep 19, 2018
I just deleted them, I don't need them
kapilsuri87 commentedon Sep 19, 2018
But I have implemented cucumber as a BDD framework. Can not really delete the same.
Also, not sure what dependencies are going to resolve by deleting the cucumber maven dependencies.
madhusmitanishu commentedon May 10, 2020
is there any resolution to this issue? Please reply.
kapilsuri87 commentedon May 10, 2020
The only way I could resolve the issue was to use webElement and not mobileElement.
Kajugul commentedon Jun 6, 2021
set your android driver like this 'private AndroidDriver < WebElement > driver = null;'
and degrade java-client to 7.4.1.
your issue will be resolved.
Manasaanand commentedon Oct 25, 2021
For me @Siddh010 Solution worked. Thanks heaps mate
Kishorekumar2789 commentedon Jan 26, 2022
Hi,
Am Still facing the same issue.
Dependencies:
Declared driver as "public AndroidDriver mDriver = null;"
In Page class:
public class LoginPage extends MobileBase {
public LoginPage() {
PageFactory.initElements(new AppiumFieldDecorator(mDriver), this);
}
But no luck. Could some one provide workable solution.
Demudu1995 commentedon Oct 27, 2022
hi guys please help me . i'm getting this exception
i'm using java client 8.2.0
java.lang.ExceptionInInitializerError
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:52)
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:33)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.proxyForAnElement(AppiumFieldDecorator.java:217)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.access$0(AppiumFieldDecorator.java:215)
at io.appium.java_client.pagefactory.AppiumFieldDecorator$1.proxyForLocator(AppiumFieldDecorator.java:107)
at org.openqa.selenium.support.pagefactory.DefaultFieldDecorator.decorate(DefaultFieldDecorator.java:62)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.decorate(AppiumFieldDecorator.java:155)
at org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:113)
at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105)
at com.greatWest.pageObject.LoginPage.(LoginPage.java:82)