QTP (HP Quick Test Pro): Issue while integrating eclipse --- solution

Asked by Djg

*** solution: see comment # 7

-------------------------------------------------------------------------------

Hi,

I have eclipse helios in windows and trying to integrate with Sikuli.
I set the CLASSPATH & PATH to the "libs" folder of sikuli in evironment variables and imported the sikuli-script.jar in eclipse.
When i run the script i get the following error. Please help?

Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class sun.awt.windows.WToolkit
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.Toolkit
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.Component
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class sun.awt.AppContext
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.AWTEvent
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Loading HP QuickTest Professional Java Support (version 10.0.2300.0) (SUN 1.6.0_13)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.KeyboardFocusManager
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.AWTEventMulticaster
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class javax.swing.JComponent
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class javax.swing.event.EventListenerList
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.MenuItem
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.MenuComponent
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Letting agent QTJA do the transformation
Letting agent QTOR do the transformation
java.util.NoSuchElementException: No mapping for class java.awt.Event
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:32)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:61)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:38)
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Documents and Settings\a8dg21\Local Settings\Temp\tmplib\Win32Util.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 at java.lang.ClassLoader.loadLibrary0(Unknown Source)
 at java.lang.ClassLoader.loadLibrary(Unknown Source)
 at java.lang.Runtime.load0(Unknown Source)
 at java.lang.System.load(Unknown Source)
 at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
 at org.sikuli.script.Win32Util.<clinit>(Win32Util.java:14)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at org.sikuli.script.Env.getOSUtil(Env.java:84)
 at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:175)
 at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:288)
 at org.sikuli.script.Screen.initBounds(Screen.java:96)
 at org.sikuli.script.Screen.<init>(Screen.java:108)
 at TestSikuli.main(TestSikuli.java:10)
DEBUG - Releasing all waiters. There are 0 waiters active.
0 [JVM Exit listener] DEBUG java_agent.replay_events - Releasing all waiters. There are 0 waiters active.

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

-- do you have path-to-java\jre6\bin in your system path or the path that is used within eclipse on running your java stuff?

-- are you using the original Java from Sun?

Revision history for this message
Djg (gdeepakjain) said :
#2

I have installed java fromSun and i have set the java bin path as well.

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

--- the Sikuli libs folder need not be in class path

--- what happens, if you build a jar and run it standalone?

Revision history for this message
Djg (gdeepakjain) said :
#4

I have not tried the standalone one. Can you please detail on how do i acheive that?

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

Ok, just forget it. I was thinking in a wrong direction.

It seems you are using: HP Mercury Quick Test Pro

This tool has very complex environment setups, that might interfere with your eclipse project settings.
So it might well be, that you have to put sikuli-script.jar somewhere into the QTP setup.

But at this point, I cannot give you further help, since I have no experience with QTP

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Mathieu Bordas (mat-bordas) said :
#7

Hi all,

I just get a similar error, and found one solution.

If QTP (HP Quick Test Pro) is installed with its Java plugin, the following environment variable is created: _JAVA_OPTIONS. And it makes your JVM always run with a QTP java agent, that seems to modify some classes that are colliding with Sikuli.

I modified my QTP's installation by removing the Java plugin, and now Java runs well.

If you don't need that QTP Java plugin, uninstall it!

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

seems to be a solution

Revision history for this message
Jai Bharti (freetalk2jai) said :
#9

Exception in thread "Thread-53" java.lang.UnsatisfiedLinkError: C:\Documents and Settings\qtp1\Local Settings\Temp\3\tmplib\Win32Util.dll: This application has
ailed to start because the application configuration is incorrect. Reinstalling the application may fix this problem

Revision history for this message
Sunil Goswami (next-cent) said :
#10

That's not really a solution. That's like saying wear really tight shoes and you'll forget your stomachache. What if I need both QTP with Java plugin and Sikuli? And I do.

Sikuli is a great tool for filling those gaps where QTP and other tools cannot work and it's real power, IMHO, is in the way it can easily integrate with Java. But it's not ready to replace QTP, I don't think that's the target anyway.

So, I need to use both Sikuli and QTP with Java plugin on the same machine. Any suggestions would be highly appreciated.

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

@Sunil
Ok, I am willing to help you to neither needing to wear tight shoes nor having stomachache, means to find a real solution.

… but I need to understand the problem (fully agreeing with your comment, but not knowing anything about QTP besides what it cant be used for):
Why is it not possible, to have both in your Eclipse setup:
QTP Java-Plugin and sikuli-java.jar(1.0.1)/sikulixapi.jar(1.1.0+) (only these jars from my pint of view are suitable for integration)?
What are the special needs, to use sikuli…jar in your QTP setup?

What are the symptoms?
What classes might interfere? (comment #7)

Did you already try with version 1.0.1?
If you want you might even try with a 1.1.0 sikulixapi.jar, which on Windows does not need any system path specifications any more (done at runtime).

Revision history for this message
Sunil Goswami (next-cent) said :
#12

@RaiMan

Thank you for such a quick response.

:)

There is not QTP Java plugin in Eclipse, it's those variables that create the problem when trying to run the program from Eclipse. (JAVA_OPTIONS and JAVA_TOOL_OPTIONS)

I have tried with Sikuli-IDE 1.0.1 and Sikulixapi1.02. I could not find a jar for 1.1.0 only a Ruby gem, and I am not using Ruby in my environment, so I didn't know how to install 1.1.0.

I have written an extremely barebones program to test this but not able to make it work yet.

package com.companyname.projectname.testname;
import org.sikuli.api.*;

public class Test_Class {
 public static void main(String[] args) {
  ScreenRegion s = new DesktopScreenRegion();
  s.capture();
        }
}

I have added the Sikulixapi1.0.2.jar to the project's build path. I am using Java 1.7

When I run the program, I get this error on the console.

java.util.NoSuchElementException: No mapping for class sun.awt.windows.WToolkit
 at com.mercury.bcel.TransformerXmlFile$MappingLocator.setMapping(TransformerXmlFile.java:96)
 at com.mercury.bcel.TransformerFactory.createTransformer(TransformerFactory.java:56)
 at com.mercury.bcel.TransformerMainImpl.transform(TransformerMainImpl.java:33)
 at com.mercury.bcel.TransformerMain.transform(TransformerMain.java:35)
 at com.mercury.javashared.transform.TransformersChain.transform(TransformersChain.java:35)
 at com.mercury.javashared.transform.CommunicationThread.processTransformRequest(CommunicationThread.java:76)
 at com.mercury.javashared.transform.CommunicationThread.run(CommunicationThread.java:42)

It's repeated a few times in the console.

Is there anything I can tell you which would help you understand my situation? Can I install Sikuli api 1.1.0 without using Ruby on Windows?

I don't need the same program to run QTP but I need to keep QTP on the same machine as other tests in my framework use QTP to test Java and Oracle based applications.

Thank you, RaiMan.

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

@Sunil
Sorry for the confusion: Since I have retracted the 1.1.0-Beta versions for now, you cannot get any 1.1.0 stuff without my personal help.

The SikuliX version 1.0.1 can be used principally, but you have to run setup with option 3, to get a sikuli-java.jar, which in turn is the jar to be used in your environment.
But it has one caveat:
You need a system path entry to SikuliX's libs folder, which in the standard is created at runtime in the same folder as the jar automatically from inside the jar.
This is a bit inconvenient and better in version 1.1.0 (the path entry is transiently created at runtime, no need for any environment variable any more).

It might be helpful to just read through:
https://github.com/RaiMan/SikuliX-2014/wiki/Usage-in-Java-programming

So you have 2 options:
- use sikuli-java.jar version 1.0.1 after having run setup
- try sikulixapi.jar (1.1.0-Beta3) preversion (just download - no setup:
https://dl.dropboxusercontent.com/u/42895525/SikuliX-1.1-Beta3/sikulixapi.jar

BTW: you are mentioning some Sikulixapi1.02 …
… but such a "thing" does not exist.
You might talk about a sikuli-api-1.0.2 from https://code.google.com/p/sikuli-api/, which is a somehow feature compatible but not API compatible Sikuli-follow-up by one of the original Sikuli developers. It is not further developed anymore since end 2012.

The "official" Sikuli now is SikuliX (http://sikulix.com), that I have taken over as head developer after the original developers left the project after 1.0RC3.

If you decide, to try the 1.1.0 version, you might be interested in the nightly builds, that will be available the next days again.

Can you help with this problem?

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

To post a message you must log in.