Hi,
I was trying to convert the test demo/checkToursDB.java to junit and I came
throug this error. Does any one know how to resolve this issue? I saw this
line in the derby_tests.policy file :
// ij needs permission to read the sql files in this jar
permission java.io.FilePermission "${derbyTesting.testjarpath}", "read";
Unexpected while populating the dataaccess denied
(java.io.FilePermissionToursDB_schema.sql read)
at
org.apache.derbyTesting.functionTests.tests.demo.CheckToursDBTest.tes
tDataPopulation(CheckToursDBTest.java:77)
So the policy file is giving the permission
I was trying to execute this code
*
public* *void* testDataPopulation() *throws* SQLException {
String[] dbfiles = {"ToursDB_schema.sql","loadTables.sql"};
Connection conn = getConnection();
*for* (*int* i = 0 ; i < dbfiles.length ; i++)
*try*{
{
String[] ijArgs = {dbfiles[i]};
ij.*main*(ijArgs);
}
} *catch* (Exception e) {
*fail*("Unexpected while populating the data" + e.getMessage());
}
--
Thanks,
Manjula.