← Back to team overview

sikuli-driver team mailing list archive

[Question #230619]: Sikuli unable to operate in command line eclipse.

 

New question #230619 on Sikuli:
https://answers.launchpad.net/sikuli/+question/230619

So, I have configured Eclipse and Selenium Webdriver for my automation in Java. But for flast contents I have planned to use Sikuli with screenshots. so I have configured Webdriver and Sikuli JARs in Eclipse .  It works perfect when I execute the java code with the play button or (Run) in eclipse GUI.  The Sikuli is able to click on button, type etc. 

Later I moved and configured Apache Ant to execute this code in command line. I wrote Build.xml and also included  sikuli-script.jar in classpath in build.xml file.  The xml file compiles and also Runs,  But when the flash part comes, where the sikuli code begins , It is unable to work and does nothing, the execution stops throwing below error in command prompt.

     [java] [error] org.sikuli.script.FileManager.loadLibrary: Native library co
uld not be loaded: VisionProxy
     [java] [error] Since native library was found, it might be a problem with n
eeded dependent libraries
     [java] java.lang.UnsatisfiedLinkError: G:\Documents and Settings\Administra
tor\eworkspace\Sample\SikuliX\libs\VisionProxy.dll: Can't find dependent librari
es
     [java]     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     [java]     at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
     [java]     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
     [java]     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
     [java]     at java.lang.Runtime.load0(Runtime.java:792)
     [java]     at java.lang.System.load(System.java:1059)
     [java]     at org.sikuli.script.FileManager.loadLibrary(Unknown Source)
     [java]     at org.sikuli.script.Finder.<clinit>(Unknown Source)
     [java]     at org.sikuli.script.Region.doFind(Unknown Source)
     [java]     at org.sikuli.script.Region.access$100(Unknown Source)
     [java]     at org.sikuli.script.Region$RepeatableFind.run(Unknown Source)
     [java]     at org.sikuli.script.Region$Repeatable.repeat(Unknown Source)
     [java]     at org.sikuli.script.Region.wait(Unknown Source)
     [java]     at org.sikuli.script.Region.find(Unknown Source)
     [java]     at org.sikuli.script.Region.getLocationFromTarget(Unknown Source
)
     [java]     at org.sikuli.script.Region.click(Unknown Source)
     [java]     at lib_files.Login.Add(Unknown Source)
     [java]     at lib_files.Login.Test(Unknown Source)
     [java]     at lib_files.Open.main(Unknown Source)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:57)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:601)
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.jav
a:217)
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
.java:152)
     [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)

     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)

     [java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
     [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:292)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:57)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:601)
     [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchU
tils.java:106)
     [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
     [java]     at org.apache.tools.ant.Target.execute(Target.java:435)
     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
     [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1393)
     [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)

     [java]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:41)
     [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248
)
     [java]     at org.apache.tools.ant.Main.runBuild(Main.java:851)
     [java]     at org.apache.tools.ant.Main.startAnt(Main.java:235)
     [java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
     [java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
     [java] java.lang.ExceptionInInitializerError
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
.java:194)
     [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)

     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)

     [java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
     [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:292)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:57)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:601)
     [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchU
tils.java:106)
     [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
     [java]     at org.apache.tools.ant.Target.execute(Target.java:435)
     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
     [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1393)
     [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)

     [java]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:41)
     [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248
)
     [java]     at org.apache.tools.ant.Main.runBuild(Main.java:851)
     [java]     at org.apache.tools.ant.Main.startAnt(Main.java:235)
     [java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
     [java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
     [java] Caused by: java.lang.ExceptionInInitializerError
     [java]     at org.sikuli.script.Region.doFind(Unknown Source)
     [java]     at org.sikuli.script.Region.access$100(Unknown Source)
     [java]     at org.sikuli.script.Region$RepeatableFind.run(Unknown Source)
     [java]     at org.sikuli.script.Region$Repeatable.repeat(Unknown Source)
     [java]     at org.sikuli.script.Region.wait(Unknown Source)
     [java]     at org.sikuli.script.Region.find(Unknown Source)
     [java]     at org.sikuli.script.Region.getLocationFromTarget(Unknown Source
)
     [java]     at org.sikuli.script.Region.click(Unknown Source)
     [java]     at lib_files.Login.Add(Unknown Source)
     [java]     at lib_files.Login.Test(Unknown Source)
     [java]     at lib_files.Open.main(Unknown Source)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:57)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:601)
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.jav
a:217)
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
.java:152)
     [java]     ... 21 more
     [java] Caused by: org.apache.tools.ant.ExitException: Permission ("java.lan
g.RuntimePermission" "exitVM") was not granted.
     [java]     at org.apache.tools.ant.types.Permissions$MySM.checkExit(Permiss
ions.java:193)
     [java]     at java.lang.Runtime.exit(Runtime.java:105)
     [java]     at java.lang.System.exit(System.java:960)
     [java]     at org.sikuli.script.FileManager.loadLibrary(Unknown Source)
     [java]     at org.sikuli.script.Finder.<clinit>(Unknown Source)
     [java]     ... 38 more
     [java] Java Result: -1


Can someone help me on this ?  I remember I got the same error 
 java.lang.UnsatisfiedLinkError: G:\Documents and Settings\Administra
tor\eworkspace\Sample\SikuliX\libs\VisionProxy.dll: Can't find dependent librari
es

when configuring SIkuli in Eclipse GUI and  I resolved it by getting the 64-bit version of JRE and Sikuli. Now how can it come back ? Please help, I'm using  windows server 2003 64-bit (x86) 

Thank you

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.