robotframework-SikuliLibrary icon indicating copy to clipboard operation
robotframework-SikuliLibrary copied to clipboard

Robot framework scripts throwing "java.lang.ExceptionInInitializerError: null" error always.

Open VijayAnanthP opened this issue 6 years ago • 9 comments

After launching URL like "Facebook.com" i have used Add Image path and Click keywords. While executing Click Keyword it throwing the error java.lang.ExceptionInInitializerError: null

Settings Library SikuliLibrary Library SeleniumLibrary

Variables ${URL} https://https://www.facebook.com/

Test Cases Login Application Launching Application and Login Keywords Launching Application and Login Open Browser ${URL} Chrome Maximize Browser Window Sleep 3 Add Image Path D:\NDMT\NDMT_Automation\01_NDMT_TestCase\SoftPKI\Images\ Click Login.PNG

VijayAnanthP avatar Jul 22 '19 09:07 VijayAnanthP

@VijayAnanthP , could you attach log.html and sikuli console log file.

rainmanwy avatar Jul 23 '19 01:07 rainmanwy

I have same kind of problem. If you try to click something with sikuli it gives that same error. However, capture screen works fine.

My sikuli log file: Sikuli_java_stdout_1567158997.4304018.txt

And my Test Execution Log: testExecutionLog

mevangulf avatar Aug 30 '19 10:08 mevangulf

I am also seeing java.lang.ExceptionInInitializerError while executing click keyword.

veena-anup avatar Sep 08 '19 04:09 veena-anup

@mevangulf , how "SikuliLibrary" is imported? I found that you call "Start Sikuli Process" in step, Do you use NEW MODE in your robot case?

@veena-anup , how about the Operating System you are using?

rainmanwy avatar Sep 11 '19 08:09 rainmanwy

Hi Rainmanwy, Thanks for the reply. I am on windows 64 bit machine.I do not know what I did(updated java I guess) now click command is working but its not actually clicking on the image I specified.When checked the report I see captured image is only half of the scree and in lesser resolution it is captured to search for the image. Did I miss anything here.Please help. I have just imported Sikulilibrary using pip in robot framework and using pycharm IDE.

veena-anup avatar Sep 11 '19 13:09 veena-anup

Finally it's working.. I had to do scaling to 125℅ n re login to the system. Then it started working.

veena-anup avatar Sep 12 '19 11:09 veena-anup

Hi, I'm also getting this error on my Windows 10 machine.

Logfile

In my project, the Java_stderr and java_stdout look quite plain Sikuli_Java

Pip List is bare, with Robotframework-sikulilibrary and robotframework installed directly through pip PipList

Running java -version: java version "1.8.0_231" Java(TM) SE Runtime Environment (build 1.8.0_231-b11) Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode, sharing)

The test itself is quite simple, just clicking on a button on the Windows 10 calculator.

*** Settings ***
Library  SikuliLibrary  mode=NEW

*** Variables ***

*** Test Cases ***
TC_000 Check
  Start Sikuli Process
  Add Image Path  ./Sikulimages
  Click  button8.PNG

cmision avatar Jan 07 '20 08:01 cmision

I might also add, PATH is set to: PATH=C:\Program Files\Python38\Scripts;C:\Program Files\Python38;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\140\Tools\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\PuTTY;C:\Users\cmisi\AppData\Local\Microsoft\WindowsApps;C:\Users\cmisi\AppData\Local\GitHubDesktop\bin;D:\Programming\Gecko;C:\Users\cmisi\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\bin

cmision avatar Jan 07 '20 08:01 cmision

Actually, nevermind. Figured it out. The JRE automatically installed from https://java.com/en/download/ was the 32 bit version. When I picked up the 64 bit version from https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html, it worked.

cmision avatar Jan 07 '20 11:01 cmision