"java.lang.ExceptionInInitializerError" thrown when I run Selenium+sikuli script in Linux

Asked by Srividhya

Problem Description
=================
I run my Selenium script from Linux environment. Using Selenium Grid concept, the browser is launched in a Remote desktop(Windows/MAC)
I am using Sikuli for simulating mouse events in my browser.

When I run the script from the linux system, the script fails with the following error,
"<WARNING>Traceback (most recent call last):
  File "/home/aptRoot/tools/python/64/Python-2.7/lib/python2.7/unittest/case.py", line 318, in run
    testMethod()
  File "/home/srividra/public_html/testcase/SRIVISIM/Condition_List_edge_Testcase/170317102108/testcase/Condition_List_edge_Testcase.py", line 63, in runTest
    myClass.verifyLog(self.testcase.neip, self.testcase.browser, self.testcase.server_ip, self.testcase.app_name)
java.lang.LinkageErrorPyRaisable: java.lang.ExceptionInInitializerError
</WARNING>

This error is thrown when the following line is executed:
"Screen s = new Screen();"

So I am unable to proceed with the execution.
NOTE: The same script is working fine when I run from Eclipse in my local system.
I have set Java path in linux "PATH" variable.

-> echo $PATH
/home/srividra/APT/aptDev/testcase/webUI/libs/sikulixsetup-1.1.0.jar:/home/aptRoot/tools/jre1.7.0_71/bin:/home/aptRoot/tools/python/64/Python-2.7/bin:/home/srividra/APT/bin:/home/srividra/APT/aptDev/bin:/home/aptRoot/tools/bin64:/home/aptRoot/tools/perls/64/perl-5.8.8/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/X11R6/bin

Please guide me on how to proceed here.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

you have to point to sikulixapi.jar via CLASSPATH environment variable.

Revision history for this message
Srividhya (sriiviidhyaa) said :
#2

Thanks for the reply.. Since I am new to sikuli, can you guide me on how to set this variable

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Sorry, not special for Sikuli, standard Java usage knowledge.

Find out, how in your environment the Java classpath has to be set, so that at runtime Java can find the SikuliX jar.

Revision history for this message
Matt (droppedchange) said :
#4

I was getting an ExceptionInInitializerError when trying to run sikuli from IntelliJ using JAVA. I was able to fix it by running intelliJ exe file as administrator. See if that helps.

Can you help with this problem?

Provide an answer of your own, or ask Srividhya for more information if necessary.

To post a message you must log in.