Facing sikuli integration error. Added correct jar files but facing with ImageMissing, NoSuchMethodException Pattern<init>, Initialization errors etc.

Asked by Harpreet on 2020-02-27

I have added below jars in Maven project. Am using autoit, java, sikuli for a desktop app.
sikulixapi.jar,
sikulixlibswin-1.1.1.jar. Added them in classpath too.

Got below dump when executed maven install from eclipse:
BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.592 s
[INFO] Finished at: 2020-02-27T13:33:27+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project spsAutomation: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\Harpreet.Sudan\Eclipse-workspace-Trial\spsAutomation\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] org/sikuli/script/FindFailed
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] org/sikuli/script/FindFailed
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:656)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Please help me to move ahead.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-02-27
Last reply:
2020-02-27
RaiMan (raimund-hocke) said : #1

[ERROR] org/sikuli/script/FindFailed

seems you got a FindFailed error.

Just track it down, by debugging your testcode in Eclipse.

Take care, that the imagefiles can be loaded (image missing problem).
In doubt use the ImagePath features.

Harpreet (harpreetsudan) said : #2

Thanks Raiman for an instant response, thing is maven install error is resolved by adding below dependency:
<dependency>
        <groupId>com.sikulix</groupId>
        <artifactId>sikulixapi</artifactId>
        <!-- <version>1.1.0</version> -->
        <version>1.1.4-SNAPSHOT</version>
    </dependency>.

But am still not able to proceed since am getting below error:
java.lang.ExceptionInInitializerError at org.sikuli.script.Pattern<init>...................Caused by SikuliXception: init: java.io.tmpdir not writable etc..

All I want is to click inside my desktop application through sikuli and its not working at all. Rest coding i have to do using native java and autoit methods. In this sikuli , although it is not giving any error while coding but its simply not running. I may have attached screenshot here but not sure from where i need to do it. Kindly refer the console output which is latest as below:

[error] FileManager: writeStringToFile: did not work: C:\Windows\Sikulix_26699364\tempTest.txt
C:\Windows\Sikulix_26699364\tempTest.txt (The system cannot find the path specified)

Everytime i make some changes to resolve the issue, a new issue arises :(

Can you help with this problem?

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

To post a message you must log in.