--- Begin Message ---
Thanks Sim,
I'll commit my changes to policy files that allow the tests to pass,
shortly.
I've figured out the cause of the problem, (I think) the jsk-policy.jar
package isn't on the boot classpath so the SecureClassLoader doesn't see
the Policy Provider. When the SecurityManager is loaded, it first
utilises the jvm's built in policy implementation, so all implies()
checks run through and the ProtectionDomain Permissions cache. I don't
know why this doesn't happen with code compiled with source=1.4 and
target=1.4 and is specific to jre1.6. I am not using the jre/lib/ext/
directory for jsk-policy.jar, it is still in trunk/lib-ext/.
One problem in this case, is getting all the arguments to each test jvm
instance, while it appears this can be done by setting the global jvm
args in qa/src/com/sun/jini/qa/resources/qaDefaults.properties, (I did
actually try this, it doesn't appear to work for all cases). The qa
harness needs to be understood better, so we can improve usability, the
test framework design, appears as though it could potentially make
testing Jini applications much easier for developers.
<jvmarg value="-Xbootclasspath/a:${river-ext.lib-dir}"/> was added to
qa/build.xml and tried.
Actually, while I was setting up the jtreg test suite to run from ant, I
found the test's required the addition AllPermission for the
river/trunk/lib-ext directory to all policy files, the same as had been
done for the jre/lib/ext directory by someone prior (possibly Peter
Jones). This doesn't seem to be a related issue, apart from both test
suites not utilising the jre/lib/ext/ directory anymore.
In a similar fashion I've granted AllPermission to trunk/lib-ext/ and
qa/lib-ext/ in jinitest.policy.
This issue only presents itself when utilising compiler source and
target values greater than 1.4, it has something to do with a compiler
optimisation I believe.
Cheers,
Peter.
Sim IJskes - QCG wrote:
On 03/27/2010 12:09 PM, Peter Firmstone wrote:
Peter Firmstone wrote:
Oh, & just in case you hadn't noticed, I haven't figured out which
code base to grant the permissions to! A little help would be good,
I'll commit the changes soon.
Very weird, it is jsk-policy.jar, something funky with the lib-ext
utilisation, I'm not using the jre/lib/ext/ dir in this case.
Cheers,
Peter.
Peter, i'm willing to help, but i need a setup i can run in my IDE. So
if you can tell me how to reproduce the problem without wading through
those big logfiles, i will help you.
Its in the svn trunk i guess, it is in the test harness, what does the
test excercise in terms of invocation of vm's with their commandlines?
Gr. Sim
--- End Message ---