title: Appium Pagefactory throws noSuchMethodException when running from POM
body: <p>When I try to run my appium scripts on the pom file ( with mvn verify or mvn test)</p>
  <p>I get a</p>
  <pre><code>java.lang.RuntimeException: java.lang.NoSuchMethodException: jdk.proxy2.$Proxy12.proxyClassLookup()
  </code></pre>
  <p>On the line that instantiates my locators:</p>
  <pre><code>PageFactory.initElements(new AppiumFieldDecorator(driver, Duration.ofSeconds(15)), this);
  </code></pre>
  <p>When I run the test directly from InteliJ or run the testng.xml file, the test succeeds</p>
  <ul>
  <li>Full pom.xml: <a href="https://pastebin.com/V0FbehMh" rel="nofollow noreferrer">https://pastebin.com/V0FbehMh</a></li>
  <li>Full error stacktrace: <a href="https://pastebin.com/11TvTq7a" rel="nofollow noreferrer">https://pastebin.com/11TvTq7a</a></li>
  <li>testng.xml: <a href="https://pastebin.com/8XZtCfRt" rel="nofollow noreferrer">https://pastebin.com/8XZtCfRt</a></li>
  <li>Related classes: <a href="https://pastebin.com/ynFizC9T" rel="nofollow noreferrer">https://pastebin.com/ynFizC9T</a></li>
  </ul>
  <p>What can be the problem, when everything is fine running from test class / testng.xml, but suddenly failing when running with maven in command line</p>