Community
Participate
Working Groups
I was having difficulty getting clean runs for the LRGTestModel, with failures in the ValidationModel and in the QueryOptionTestSuite in the FeatureTest Model. It turns that there are 2 ways to solve the problem: 1) do not run with a security model - i.e. do not have -Djava.security.manager set when running the tests. However, in your 'endorsed JRE security library directory' - normally $JRE_HOME/lib/security, the original java.policy file needs to be replaced with one that grants AllPermission's: grant { permission java.security.AllPermission; }; This is (sorta) how we run things in ADE (well not quite, but close enough - we get default settings from OC4J that are equivalent). 2) the above option is not very nice because it depends upon resources outside of the SVN tree, a variation of the 'works-for-me' problem. We should change the Wiki documentation for running the tests (http://wiki.eclipse.org/EclipseLink/Test/LRG#Running_the_Legacy_LRG) to: 4. Add "-Xmx256m -Djava.security.manager -Djava.security.policy==${workspace_loc:eclipselink.core.test}/resource/java.policy.allpermissions" to the VM arguments section of the Arguments tab and check the above java.policy file into to Subversion as: ${workspace_loc:eclipselink.core.test}/resource/java.policy.allpermissions This does not solve 100% of the problems - in ClearQueryOptionsOnStatementTest, ~ line 104, the code tries to grab a method from a class (instead of using a PrivilegedAccessHelper) - the code needs to be changed to: -- Oracle Email Signature Logo Mike Norman | Principal Software Designer | 613.288.4638 Oracle Server Technologies | TopLink Product 45 O'Connor Street, Suite 400 | Ottawa, ON K1P 1A4 | (fax) 613.238.2818
Created attachment 83249 [details] patch for ClearQueryOptionsOnStatementTest
checked in fix into SVN repository: - check-in a java.policy file (under 'resources' directory) that gives AllPermission's - as per attach'd diff, change ClearQueryOptionsOnStatementTest to use PrivilegedAccessHelper to get declared method and do "method.setAccessible(true);" as well - modify documentation about running EclipseLink LRG (http://wiki.eclipse.org/EclipseLink/Test/LRG#Running_the_Legacy_LRG) to invoke TestBrowser with default Security Manager and custom java.policy file from above
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink