db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manjula Kutty" <manjula.ku...@gmail.com>
Subject File Permission for ij tests
Date Wed, 19 Dec 2007 23:44:43 GMT
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.

Mime
View raw message