sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #00712
[Question #142062]: ExceptionInInitializerError when running Sikuli code through Java
New question #142062 on Sikuli:
https://answers.launchpad.net/sikuli/+question/142062
I'm trying to run some simple Sikuli code through java, and I get an exception when Sikuli is being initialized. The following is logged.
Windows utilities loaded.
Sikuli vision engine loaded.
Text Recgonizer inited.
Then I get the stack trace below.
N/A
java.lang.ExceptionInInitializerError
at org.sikuli.script.Finder.(Finder.java:22)
at org.sikuli.script.Region.findNow(Region.java:589)
at org.sikuli.script.Region.wait(Region.java:277)
at org.sikuli.script.Region.find(Region.java:235)
at org.sikuli.script.Region.getLocationFromPSRML(Region.java:652)
at org.sikuli.script.Region.click(Region.java:346)
at com.hmh.qa.test.TestCycleTest.takeAssessment(TestCycleTest.java:97)
at com.hmh.qa.test.TestCycleTest.testStudentTakesTest(TestCycleTest.java:85)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at java.io.Reader.(Reader.java:61)
at java.io.InputStreamReader.(InputStreamReader.java:55)
at org.sikuli.script.ResourceExtractor.writeFileList(ResourceExtractor.java:23)
at org.sikuli.script.ResourceExtractor.extract(ResourceExtractor.java:17)
at org.sikuli.script.TextRecognizer.init(TextRecognizer.java:30)
at org.sikuli.script.TextRecognizer.(TextRecognizer.java:24)
at org.sikuli.script.TextRecognizer.getInstance(TextRecognizer.java:45)
at org.sikuli.script.TextRecognizer.(TextRecognizer.java:16)
The code triggering the exception is given below. Line 97 that generates the exception is the screen.click() statement
Screen screen = new Screen();
screen.click("etc/imgs/English.png", 0);
I have done all the pre-requisites as suggested.
1. sikuli-script.jar is in the classpath
2. C:\Program Files\Java\jre6\bin;C:\Program Files\Sikuli X\libs are in the path
I have a python script of the same code. It runs from the command line with the following command.
java -jar target\lib\sikuli-script.jar sikuli.sikuli
The environment details are given below
OS: Win XP (SP3)
Java: 6
Sikuli: Sikuli-X-1.0rc1-win32.exe
Please help me resolve the issue. I need the code to run from Java since it is within a test case already automated using Selenium RC.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.