Ranorex 5.0.3
Windows 7
Java 1.6.0_45
Intermittent Ranorex warnings on new Java windows/forms:
"Failed to instrument Java process. Please make sure you have enough privileges to access the process.
(This message is only shown once per report.)"
1. This app is running as administrator and Ranorex is running as administrator.
2. This happens at various points and various windows, sometimes on the initial start-up, sometimes well into the application.
3. The windows are valid and the test continues without error so the objects are being found.
I run the same test 3 times in a row (3 different stores on our POS) and when it happens it only happens in one of them, not all of them. It appears to be mainly on Validate steps, but I'm not sure about that.
BUG: "Fail to instrument..." in Java app on new windows
BUG: "Fail to instrument..." in Java app on new windows
Shortcuts usually aren't...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: BUG: "Fail to instrument..." in Java app on new windows
Hello Kelly,
May I ask if it’s somehow possible to grant us access to your Java application?
Thank you in advance.
Regards,
Robert
May I ask if it’s somehow possible to grant us access to your Java application?
Thank you in advance.
Regards,
Robert
Re: BUG: "Fail to instrument..." in Java app on new windows
Unfortunately, no, it is not possible. The application requires domain credentials and access.
I would offer a web-meeting, but since I cannot predict when or if this will occur it might be a waste of our time.
It appears to be related to the new method of Java instrumentation. Our application creates new instances of the JVM for several windows when it creates the windows. So, there are new top-level /form objects for each of the windows, and new java instances for each one. It seems that the Ranorex instrumentation is taking too long to initialize sometimes so Ranorex continues the test before the JVM injection is fully complete on the new JVM instance.
I would offer a web-meeting, but since I cannot predict when or if this will occur it might be a waste of our time.
It appears to be related to the new method of Java instrumentation. Our application creates new instances of the JVM for several windows when it creates the windows. So, there are new top-level /form objects for each of the windows, and new java instances for each one. It seems that the Ranorex instrumentation is taking too long to initialize sometimes so Ranorex continues the test before the JVM injection is fully complete on the new JVM instance.
Shortcuts usually aren't...
Re: BUG: "Fail to instrument..." in Java app on new windows
I have a web start application and I am experiencing the same issue.
Re: BUG: "Fail to instrument..." in Java app on new windows
Mayra, what version of Ranorex are you using?
Shortcuts usually aren't...
Re: BUG: "Fail to instrument..." in Java app on new windows
Update:
I believe that this issue is a result of using a JNLP to start the Java application. If I open the JNLP link and then attempt to wait for the resulting Java form to exist, I get the "Failed to instrument..." warning. It appears that Ranorex attempts to start the Java plugin before java is actually fully started, so it fails, when in reality, the plugin is working, but Ranorex now can't connect to it because it disposed of the handle after the error.
If I put a static DELAY(30s) in my test after starting the JNLP, but before attempting any actions on any Java elements, I don't get the error.
While this work-around works most of the time, there are times when the JNLP takes longer than 30s to load, which means my test will have the warning, and then will not work after that in many instances.
I am working on a small JNLP-based Java app that will demonstrate the issue. I will post it when I get it working.
I believe that this issue is a result of using a JNLP to start the Java application. If I open the JNLP link and then attempt to wait for the resulting Java form to exist, I get the "Failed to instrument..." warning. It appears that Ranorex attempts to start the Java plugin before java is actually fully started, so it fails, when in reality, the plugin is working, but Ranorex now can't connect to it because it disposed of the handle after the error.
If I put a static DELAY(30s) in my test after starting the JNLP, but before attempting any actions on any Java elements, I don't get the error.
While this work-around works most of the time, there are times when the JNLP takes longer than 30s to load, which means my test will have the warning, and then will not work after that in many instances.
I am working on a small JNLP-based Java app that will demonstrate the issue. I will post it when I get it working.
Shortcuts usually aren't...
Re: BUG: "Fail to instrument..." in Java app on new windows
OK, I have a project that demonstrates the issue. However, I am sending both the Java project (NetBeans, but it should work anywhere) and the Ranorex solution via email so there are no security issues.
Shortcuts usually aren't...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: BUG: "Fail to instrument..." in Java app on new windows
Hello krstcs,
Thank you for providing the example.
It is indeed an issue and will be resolved within one of our next releases. Thank you for your patience.
Regards,
Robert
Thank you for providing the example.
It is indeed an issue and will be resolved within one of our next releases. Thank you for your patience.
Regards,
Robert