← Back to team overview

sikuli-driver team mailing list archive

[Bug 1835908] Re: [1.1.4] Class com.sun.jna.Native not found --- fixed build #321

 

Hi RaiMan, 
I recently migrated to sikuli 1.1.4 and i'm automating an applet in my project. I'm receiving a similar error mentioned by Valerij. below is the error

****************************************************************************************************
java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
	at org.sikuli.natives.SXUser32.<clinit>(SXUser32.java:13)
	at org.sikuli.script.support.KeyboardLayout.getCurrentLayout(KeyboardLayout.java:591)
	at org.sikuli.script.support.KeyboardLayout.toJavaKeyCode(KeyboardLayout.java:613)
	at org.sikuli.script.Key.toJavaKeyCode(Key.java:516)
	at org.sikuli.script.Key.<clinit>(Key.java:401)
	at org.sikuli.script.Region.type(Region.java:4658)
	at com.org.PageObjects.UCaaS.BCRMSiteLocationnContacts.SearchLocationSikuli(BCRMSiteLocationnContacts.java:133)
	at com.org.ExecutableTests.UCaaS.UCaaSTest.UCaaSAdd(UCaaSTest.java:150)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
	at org.testng.TestNG.run(TestNG.java:1057)
	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

******************************************************************************************************

I removed the jna and jna-platform as suggested by you but yet am facing
the same error.

The error comes at the "type" method of "Screen" class.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1835908

Title:
  [1.1.4] Class com.sun.jna.Native not found --- fixed build #321

Status in Sikuli:
  Fix Committed

Bug description:
  Exception in thread "Thread-145" Exception in thread "Thread-133" java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.script.Finder$FindInput2
  	at org.sikuli.script.Finder.<init>(Finder.java:36)
  	at OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
  	at java.base/java.lang.Thread.run(Thread.java:835)
  java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
  	at org.sikuli.natives.SXUser32.<clinit>(SXUser32.java:9)
  	at org.sikuli.natives.WinUtil.<clinit>(WinUtil.java:37)
  	at org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1631)
  	at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1574)
  	at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1399)
  	at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1603)
  	at org.sikuli.script.Finder$Finder2.<clinit>(Finder.java:571)
  	at org.sikuli.script.Finder$FindInput2.<clinit>(Finder.java:1210)
  	at org.sikuli.script.Finder.<init>(Finder.java:36)
  	at OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
  	at java.base/java.lang.Thread.run(Thread.java:835)

  
  i am getting these exception when running:
    Finder objFinder = new Finder(BufferedImage);
  This code worked fine on sikuli 1.1.4 and then stopped working after updating to latest 1.1.4 build

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1835908/+subscriptions


References