Java AWT/Swing Failed to Instrument Java Process. Plug in?

Ask general questions here.
Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by Mayra » Mon Jul 28, 2014 4:13 pm

I am trying to test a web start application and I dont get any control recognition.
When running the spy I get the following message: Ranorex Technology Limitation. Failed to Instrument Java Process. Please make sure you have enough privileges to access the process.
When I run the Tool->Instrumentation Wizard I dont see Java/AWT listed in the options for Instrumentation.
Looking at the user guide I see The Ranorex Java Plug-In allows testing of Java Swing and Java AWT applications. With Ranorex 5.0.0 and higher, the instrumentation will be enabled automatically, but seems it is not listing java because I dont have the plugin. Where can I get the plug in? The Ranorex version that I have installed is version 5.0.2.17874. Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by Support Team » Wed Jul 30, 2014 3:50 pm

Hi Mayra,

Please ensure that the obsolete instrumentation of your Java Runtime Environment is deactivated.
Therefore, please perform the steps which are provided in our User Guide under the following Links:
Disable via Instrumentation Wizard
Disable obsolete instrumentation manually

May I also ask you to update Ranorex to 5.0.3 or higher?
In version 5.0.3 a bug regarding the automatic instrumentation of Java Applets was fixed.
More information can be found in our Release Notes

Regards,
Markus (S)
.
Image

jmcwhinney
Posts: 3
Joined: Tue Aug 19, 2014 10:17 pm

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by jmcwhinney » Wed Aug 20, 2014 6:36 pm

Hello,

I am having the same issue and have tried the steps recommended above.
I am running the trial version of ranorex v5.1.1.18898
The AUT is a java AWT applet embedded in a web page.
Ranorex fails to record the actual actions made to the fields and buttons etc within the applet.
It instead records only mouse clicks (x and y coordinates) and keyboard strokes.

Looking at the ranorex Spy (32 bit), I do not see the java process j2plauncher.exe

Thanks!
- James

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by krstcs » Wed Aug 20, 2014 8:16 pm

James,

Welcome to Ranorex!

First, is this the same issue that you reported in the thread here: (http://www.ranorex.com/forum/post27688.html#p27688)? If so, please keep the discussion limited to one thread. If it needs to be combined, the Ranorex support team can do it for us.

Second, have you tried running the Java applet as a stand-alone app (external to the web page), if possible? Can Ranorex identify objects in this configuration?

Finally, you mention "j2plauncher.exe", is this a home-built executable, or were you referring to jp2launcher.exe, the Java Plaform 2 Launcher? Just want to make sure we are all talking about the same thing.


Also, if you need a faster response, you might want to email support at support[at]ranorex.com (changing the "[at]" to "@").
Shortcuts usually aren't...

jmcwhinney
Posts: 3
Joined: Tue Aug 19, 2014 10:17 pm

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by jmcwhinney » Thu Aug 21, 2014 4:52 pm

Thanks Krstcs,

Yes, this is the same topic as the other post. Lets use this thread to continue the discussion & troubleshooting and cancel the other.

Unfortunately it is not an application that I built, and I have not been successful in figuring out how to download it and run it as a stand alone application.

I mentioned the jp2launcher.exe (sorry I spelled it incorrectly) because I have seen print screens of ranroex where the java process appears in the spy application, and beneath it are all of the java windows and components.
In my case I do not see the java process listed, only jp2launcher.exe and the java applet's windows and applications are not visible below it.

Also, for what its worth, I have run into the same issue with all other test tools I have downloaded including testcomplete, hp's UFT, and squish. None of them are recording any actions made within the java applet embedded within the website.

Thanks,
- James

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by krstcs » Thu Aug 21, 2014 5:42 pm

The Ranorex team might need a link to the site in question, if you can provide it, in order to help further. You should send it to [email protected], if you can.

My guess would be that the imbedded application is being presented as a drawing pane, like DirectX or something like that. If that is the case, it would be difficult for any UI automation tool to capture elements.
Shortcuts usually aren't...

jmcwhinney
Posts: 3
Joined: Tue Aug 19, 2014 10:17 pm

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by jmcwhinney » Thu Aug 21, 2014 5:51 pm

Hi,

Unfortunately it is an internal site and I cannot provide access.

However, I can provide you with this excerpt of the html of the page in question where the java applet is embedded to give you some idea.

Code: Select all


<html xmlns='removed for ranorex board'>
<head>
<title>Infor Web UI</title>
<link REL="shortcut icon" type="image/x-icon" HREF="../favicon.ico?"/>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<meta name='ROBOTS' content='NOINDEX, NOFOLLOW' />
<script TYPE="text/javascript" src="../scripts/jquery-1.5.2.js"></script>
<script TYPE="text/javascript" src="../scripts/jquery.json-2.2.js"></script>
<script TYPE="text/javascript" src="../scripts/infor-companyon-client.js"></script>
<script TYPE="text/javascript" src="../scripts/infor-webui-client.js"></script>
<script type="text/javascript">

initClientJs('If you leave or refresh this page, Infor Web User Interface will be closed (any changes you made will NOT be saved).');
</script>
</head>
<body style='margin:0; width=100%; height=100%' scroll='no' onfocus='gotFocus()' >
<div style='width:100%; height:100%; position:absolute; z-index:50;' id='webuidiv' >
<EMBED name="Framework" id="Framework" type="application/x-java-applet;version=1.6" width="100%" MAYSCRIPT
       height="100%" align="baseline" codebase="../applets" code="com.ssaglobal.webtop.client.init.Webtop.class" image="" 
          archive=",jide-common.jar,jide-dock.jar,commons-codec-1.5.jar,init.jar,webtop.jar,navigation.jar,dem.jar,erp.jar,workflow.jar,jviews-gantt-all.jar,jviews-framework-all.jar,icu4j.jar">
   <NOEMBED>
<DIV style='font-family:verdana'>Infor Web User Interface requires a Java 1.6 (or higher)-plugin. You can download this plugin here<DIV>
   </NOEMBED>
</EMBED>
</div>
</body>
</html>
Attachments
ranorex_baan_Webtop.png
ranorex_baan_Webtop.png (70.81 KiB) Viewed 3422 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by Support Team » Tue Aug 26, 2014 2:24 pm

Hi Jmcwhinney,

Thank you for the code sample. Unfortunately the <embed> tag is currently not supported, but it will be added in one of our next releases.
As a workaround in the meantime I would suggest to use the <applet> tag to load your java applets.

Regards,
Markus(S)
.
Image

wcrockett
Posts: 17
Joined: Thu Aug 13, 2015 9:30 pm
Location: Fresno, CA

Re: Java AWT/Swing Failed to Instrument Java Process. Plug in?

Post by wcrockett » Thu Aug 13, 2015 9:31 pm

EDIT: Ignore this question... I found that it is now supported in the patch notes.

Hello,

Has EMBED support been released yet? I am demoing the most recent release of Ranorex, but can't seem to interact with the menu's in an Oracle Forms and Reports based web application.

Thank you,
Wes