[ http://issues.apache.org/jira/browse/DERBY-1449?page=comments#action_12418530 ]
Sunitha Kambhampati commented on DERBY-1449: -------------------------------------------- I tried this test out checkDataSource.java with 10.1 derbyclient.jar and derbyTesting.jar, and rest are 10.2 jars and followed instructions to run with new server/old client from our wiki. The exceptionInitializer error is actually a security permission exception on the property 'framework' as seen in the exception trace and as Kathey mentioned in one of her mails to the list. I was wondering why the test harness was not able to read this property. I noticed that the security policy file grants permissions to read all property for derbytesting.jar in both 10.1 and 10.2, so ideally it should work. Then it hit me, that my classpath had 10.1 jars in one location and 10.2 jars in another location and that wont work in our harness. In my classpath, the derby.jar and derbynet.jar were before any of the other jars. When you run the test, it sets the 'csinfo.codejar' as the location for the jar files and the derby_tests.policy file expects that the derbyTesting.jar and derbytools.jar etc are all in that directory as derbynet.jar. But it picked up the csinfo.codejar as the location where the derbynet.jar was and thus , the policy file was not granting permission to my 10.1 jars that were in the classpath and hence the exception. To fix this, all that was needed is to place the 10.1 derbyclient.jar and 10.1 derbyTesting.jar in the same directory location where the other derbynet.jar and derby.jar are and then permissions will be granted correctly and test passes. java -Dderby.system.home=C:\workghm\svnclient\trunk2\test\DerbyNetClient\checkDataSource -Djava.security.manager -Djava.security.policy=C:\workghm\svnclient\trunk2\test/derby_tests.policy -Dcsinfo.codejar=file:/C:/workghm/svnclient/trunk2/jars/sane/ -Dcsinfo.codedir=C:\workghm\svnclient\trunk2\jars\sane -Dcsinfo.serverhost=localhost -Dcsinfo.trustedhost=localhost -Dcsinfo.codeclasses=file://unused/ org.apache.derby.drda.NetworkServerControl start java -Dderby.system.home=C:\workghm\svnclient\trunk2\test\DerbyNetClient\checkDataSource -Dderby.infolog.append=true -Duser.dir=C:\workghm\svnclient\trunk2\test\DerbyNetClient -Dframework=DerbyNetClient org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDataSource -p C:\workghm\svnclient\trunk2\test\DerbyNetClient\checkDataSource\checkDataSource_app.properties So both these tests (checkDataSource and checkDataSource30) works on my machine. If I am missing some step or such, please let me know. I think , in the environment where this diff was reported maybe there is a test setup issue (?) If someone else can try and confirm what I see, that would be great!. Thanks. > checkDataSource tests fail with 10.1 client and 10.2 server > ----------------------------------------------------------- > > Key: DERBY-1449 > URL: http://issues.apache.org/jira/browse/DERBY-1449 > Project: Derby > Type: Test > Versions: 10.2.0.0, 10.1.3.0 > Environment: derbyclient.jar and derbyTesting.jar from 10.1 > all other jars from 10.2 > Reporter: Deepa Remesh > > jdbcapi/checkDataSource.java and jdbcapi/checkDataSource30.java fail with > exception like this: > org.apache.derby.client.am.SqlException: The exception > 'java.lang.ExceptionInInitializerError' was thrown while evaluating an > expression. SQLSTATE: XJ001: Java exception: ': > java.lang.ExceptionInInitializerError'. SQLSTATE: XJ001: Java exception: > 'access denied (java.util.PropertyPermission framework read): > java.security.AccessControlException'. > at > org.apache.derby.client.am.Statement.completeExecute(Statement.java:1156) > at > org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:296) > at > org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:97) > at > org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:74) > at > org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:174) > at > org.apache.derby.client.am.Statement.readExecuteCall(Statement.java:1122) > at > org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:1414) > at > org.apache.derby.client.am.CallableStatement.executeX(CallableStatement.java:124) > at > org.apache.derby.client.am.CallableStatement.execute(CallableStatement.java:114) > at > org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDataSource.runTest(checkDataSource.java:123) > at > org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDataSource.main(checkDataSource.java:92) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira