0
votes

I am running Testng with Sikuli script, it is working fine in Eclipse ide. In Eclipse IDE I am using Java 1.7.0 version.

But when I created an Ant script it is throwing an exception. When I checked with ant -v

Apache Ant version 1.7.1 compiled on September 8 2010 Buildfile: build.xml Detected Java version: 1.6 --->(I need Java 1.7 version) Detected OS: Linux [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. [property] Loading Environment env. Build sequence for target(s) `build' is [init, build] Complete build sequence is [init, build, clean, compile, run, jar, usage, makexsltreports, all, create-jar, runTestNG, ]

init: [echo] start.time

build:

BUILD SUCCESSFUL Total time: 0 seconds

I have to use Java 1.7

When I run ant.

ant run

java.lang.UnsatisfiedLinkError: /tmp/tmplib/libVisionProxy.so: /tmp/tmplib/libVisionProxy.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1755) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1651) at java.lang.Runtime.load0(Runtime.java:787) at java.lang.System.load(System.java:1022) at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44) at org.sikuli.script.Finder.(Finder.java:33) at org.sikuli.script.Region.doFind(Region.java:1029) at org.sikuli.script.Region$RepeatableFind.run(Region.java:1232) at org.sikuli.script.Region$Repeatable.repeat(Region.java:1203) at org.sikuli.script.Region.wait(Region.java:497) at org.sikuli.script.Region.find(Region.java:381) at org.sikuli.script.Region.getLocationFromPSRML(Region.java:1129) at org.sikuli.script.Region.click(Region.java:606) at org.sikuli.script.Region.click(Region.java:593) at Sample_Test.launchApplication(Sample_Test.java:74) at Sample_Test.test1(Sample_Test.java:330) ... Removed 24 stack frames

2

2 Answers

1
votes

Try

export JAVA_HOME=/usr/lib/jvm/jdk1.7

or wherever you installed java7 before running ant for your java version problem. It should handle the 64/32 bits problem as well as 1 of your java version seems to be a 32bit install on a 64bit architecture.

0
votes

Perhaps it has something to do with that your java version is a 64 bit installation rather than a 32 bit installation. I'm not entirely sure though. Either that or Grooveek's suggestion. :)