Unable to run sikuli project on Win Vista machine.

Asked by Anamika Singh

I am using Sikuli application on a Windows Vista(SP2) 32-bit machine and i have already added following path :

path-to-Java-JRE\jre6\bin

path-to-SikuliX\libs

Then I tried to run the script and got following exception :

[info] Windows utilities loaded.
FAILED CONFIGURATION: @BeforeClass beforeClass
java.lang.NoClassDefFoundError: com/sun/awt/AWTUtilities
 at org.sikuli.script.Win32Util.setWindowOpaque(Win32Util.java:84)
 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 com.qait.cengage.cnow.ui.student.assignments.StudentTakeAssignment.<init>(StudentTakeAssignment.java:18)
 at com.qait.cengage.cnow.actions.BaseClass.initObjects(BaseClass.java:70)
 at com.qait.cengage.cnow.actions.BaseClass.startBrowser(BaseClass.java:55)
 at com.qait.cengage.cnow.test.InstructorCourseCreation.CourseCreationManuallyTest.beforeClass(CourseCreationManuallyTest.java:32)
 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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
 at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:543)
 at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:212)
 at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
 at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
 at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
 at org.testng.TestRunner.privateRun(TestRunner.java:758)
 at org.testng.TestRunner.run(TestRunner.java:613)
 at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
 at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
 at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
 at org.testng.SuiteRunner.run(SuiteRunner.java:240)
 at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
 at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
 at org.testng.TestNG.runSuitesSequentially(TestNG.java:1141)
 at org.testng.TestNG.runSuitesLocally(TestNG.java:1066)
 at org.testng.TestNG.run(TestNG.java:978)
 at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
 at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
 at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)

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

--- current Java version from oracle?

run IDE using Sikuli-IDE.bat

Revision history for this message
Anamika Singh (anamikasingh) said :
#2

Currently I am using JAVA 6 . I have installed sikuli and its working fine but while running sikuli project i got the above exception.

II am using Sikuli-X-1.0rc3 (r905)-win32.

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

What version of Java 6? we are at 29+ now.
Original from Oracle?

Revision history for this message
Anamika Singh (anamikasingh) said :
#4

I am using 21 version of java. I have downloaded it from oracle's official website.

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

It must have something to do with the fact, that you are using TestNG.

This might setup its own environment or change something else, so that the windows awt support is not found or used in a different way.

You should check somehow, wether Sikuli works without TestNG directly from a simple Java main program.

Revision history for this message
Anamika Singh (anamikasingh) said :
#6

Hi RaiMan,

I have checked sikuli with simple java program (without TestNG) But still problem remains the same.

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/awt/AWTUtilities
 at org.sikuli.script.Win32Util.setWindowOpaque(Win32Util.java:84)
 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)
[info] Windows utilities loaded.
 at DemoSikuli.main(DemoSikuli.java:8)

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

You have to check again your Java installation including the class path at runtime.

Check, where com/sun/awt/AWTUtilities is stored and wether it can be found by the class path.

Can you help with this problem?

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

To post a message you must log in.