← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #187447]: ExceptionInInitializerError

 

Question #187447 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/187447

Description changed to:
Hello

I am trying to run some basic Code from the sikuli-script library , but
all I get is an ExceptionInInitializerError. The following line throws
the Exception.

Screen s = new Screen();

Here is the Error Message:

java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.sikuli.script.Env.getOSUtil(Env.java:91)
	at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:180)
	at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:293)
	at org.sikuli.script.Screen.initBounds(Screen.java:105)
	at org.sikuli.script.Screen.<init>(Screen.java:117)
	at pageobjects.AddToolchainShell.setToolchain(AddToolchainShell.java:59)
	at pageobjects.PreferencesShell.setToolchain(PreferencesShell.java:59)
	at Test1.leerTest(Test1.java:56)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner.run(SWTBotJunit4ClassRunner.java:54)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:64)
	at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:117)
	at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at com.wapmx.nativeutils.jniloader.DefaultJniExtractor.extractResource(DefaultJniExtractor.java:125)
	at com.wapmx.nativeutils.jniloader.DefaultJniExtractor.extractJni(DefaultJniExtractor.java:110)
	at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:43)
	at org.sikuli.script.Win32Util.<clinit>(Win32Util.java:19)
	... 38 more

I have found another post with the same Problem, but i didnt realy understand where the problem was and how it was solved. I should add that I am working with Eclipse, and that i added the sikuli-script.jar as an library. The System is Win 7 64-Bit.
My first try was to add just the jar and put the jar in the classpath, but that just gave me an ClassDefNotFoundError. If someone also could explain me why that didnt work.
Thx in advance.

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