java.lang.RuntimePermission modifyThread)

Hi all,

i am calling a java class from javascript through (dwr library). the javascript call initiates the right class but during the processings. the follow error messages comes.

java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThread)

although i have entered the followed lines in the policy file.

permission java.lang.RuntimePermission "queuePrintJob";

permission java.lang.RuntimePermission "modifyThread";

permission java.io.FilePermission "<<ALL FILES>>", "read, write";

this does stop the modifyThread problem but file permission error still comes up..

i would be grateful, if someone can let me know the solution please

zaman

[747 byte] By [learner@java_Foruma] at [2007-11-26 18:21:58]
# 1
Clearly you have modified the wrong file with the right stuff. Can you run the java code with -Djava.security.debug=failure.
ejpa at 2007-7-9 5:55:51 > top of Java-index,Security,Other Security APIs, Tools, and Issues...
# 2

Thanks for replying. My program is GUI based and i initiating java class from javascript code. i think it is a javascript thread, that is trying to access java thread, which java security is not allowing.

By adding the above lines in policy file, in java security folder does make difference and stop first problem "modify Thread" error but does not stop the second error "file permission".

I can eleminates all problems by adding following line in the policy file and it works fine:

permission java.security.AllPermission;

But this is extremely dangerous, as it will not imply any security measures. I require more secure solution.

i would be grateful, if some one can provide it.

zaman

learner@java_Foruma at 2007-7-9 5:55:51 > top of Java-index,Security,Other Security APIs, Tools, and Issues...
# 3
What is the complete text of the second error, the file permission error?
ejpa at 2007-7-9 5:55:51 > top of Java-index,Security,Other Security APIs, Tools, and Issues...