Java AUT throwing error in UFT.
Question ID: 107506
0
0

I am trying to work with Java objects, the objects are not seen as such and the Java console displays some exception related to the security, like for example:

Exception caught =access denied (java.util.PropertyPermission user.name read)
java.security.AccessControlException: access denied (java.util.PropertyPermission user.name read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

Marked as spam
Posted by (Questions: 22, Answers: 6)
Asked on March 22, 2017 2:50 pm
42 views
Answers (1)
0
Private answer

I have found that the it may be necessary to modify the permissions in the ''java.policy'' file. HPE has a Document and procedure how to address this issue ([KM1373363](https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM1373363)). Below is quote from HPE document. Please see document for up to date procedures.

It is necessary to modify the permissions in the ''java.policy'' file. To do so:

Note: refer ''testing product'' as QuickTest Professional (QTP), Unified Functional Testing (UFT) or Sprinter

1. Close testing product.
2. Close UFT
3. If application is Java Applet based (either Java or Oracle applications), close all opened browsers.
4. Search / Locate ''java.policy'' file in the JRE directory (by default the path should be: ''C:Program FilesJavajre6libsecurity'')
5. Open mentioned file with any text editor
6. Add the following lines at the end of the file:

grant {
permission java.security.AllPermission;
};

7. Save the file
8. Try again
9. If same error occurs, then a. Repeat steps 1 - 3 b. Search all ''java.policy'' on machine c. Repeat steps 5 to 8 with each found file

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on March 22, 2017 2:51 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top