db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <kristian.waa...@oracle.com>
Subject Re: Failed to invoke class org.apache.derbyTesting.functionTests.tests.compatibility._Suite
Date Fri, 05 Oct 2012 05:58:50 GMT
On 05.10.2012 06:29, Mamta Satoor wrote:
> Hello,
>
> Not sure if I am encountering following problem because of my
> environment but I did a svn update earlier today on trunk and after
> building the classes, I fired junit suite but I get following error. I
> started the junit suite with following command
> time java  -Dderby.tests.trace=true junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All>  runall.out 2>&1
> Prepare to run upgrade tests from 10.9.1.0
> {ReleaseRepository} 0 candidate releases at
> C:\Users\IBM_ADMIN\.derbyTestingReleases
> ALARM: No old releases found for current configuration/environment
> Failed to invoke class
> org.apache.derbyTesting.functionTests.tests.compatibility._Suite
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:611)
> 	at org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:179)
> 	at org.apache.derbyTesting.functionTests.suites.AllPackages.addSuiteByReflection(AllPackages.java:149)
> 	at org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:61)
> 	at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:51)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:611)
> 	at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126)
> 	at junit.textui.TestRunner.start(TestRunner.java:184)
> 	at junit.textui.TestRunner.main(TestRunner.java:143)
> Caused by: java.lang.IllegalStateException: only running off jars is
> supported, currently running off
> C:\p4clients\svnmain\client3\trunk\classes
> 	at org.apache.derbyTesting.functionTests.tests.compatibility.VersionCombinationConfigurator.getRunningDistribution(VersionCombinationConfigurator.java:260)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility.VersionCombinationConfigurator.filterVersions(VersionCombinationConfigurator.java:236)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility.VersionCombinationConfigurator.addTests(VersionCombinationConfigurator.java:168)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility._Suite.addVersionCombinations(_Suite.java:81)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility._Suite.suite(_Suite.java:135)
> 	... 15 more
> FAILED to invoke
> org.apache.derbyTesting.functionTests.tests.compatibility._Suite
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:611)
> 	at org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:179)
> 	at org.apache.derbyTesting.functionTests.suites.AllPackages.addSuiteByReflection(AllPackages.java:149)
> 	at org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:61)
> 	at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:51)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:611)
> 	at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126)
> 	at junit.textui.TestRunner.start(TestRunner.java:184)
> 	at junit.textui.TestRunner.main(TestRunner.java:143)
> Caused by: java.lang.IllegalStateException: only running off jars is
> supported, currently running off
> C:\p4clients\svnmain\client3\trunk\classes
> 	at org.apache.derbyTesting.functionTests.tests.compatibility.VersionCombinationConfigurator.getRunningDistribution(VersionCombinationConfigurator.java:260)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility.VersionCombinationConfigurator.filterVersions(VersionCombinationConfigurator.java:236)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility.VersionCombinationConfigurator.addTests(VersionCombinationConfigurator.java:168)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility._Suite.addVersionCombinations(_Suite.java:81)
> 	at org.apache.derbyTesting.functionTests.tests.compatibility._Suite.suite(_Suite.java:135)
> 	... 15 more
> Failed to invoke suite():java.lang.reflect.InvocationTargetException
>
> I reran the junit test by overriding the location of the released jars
> but that did not fix the problem. What could I be doing wrong? This is
> on Windows XP running the tests with ibm 1.6

Hi Mamta,

According to the error message, the test is refusing to run because you 
are running with the classes directory on the classpath instead of the jars.
Is this the case?

When run off the classes directory the test can't easily include only a 
component of Derby in a spawned process. For instance, it can't easily 
include only the trunk client - it's all or nothing.
I added the restriction given that only two jars have to be added to the 
classpath (derbyrun.jar and derbyTesting.jar), and it only takes a 
minute or so to build the jars. That seemed like a small price to pay 
before running suites.All. We could make the test emit another ALARM and 
skip itself.
Opinions?

My commit from yesterday should enable the test on Windows systems where 
the old releases reside on a local disk (non UNC path / network drive). 
Based on your output you have the old releases in a non-standard 
location. That should only result in the ALARM message and no failure. 
That can be fixed by installing the old releases in the expected 
location ($HOME/.derbyTestingReleases), or by specifying 
-DderbyTesting.oldReleasePath.


Regards,
-- 
Kristian

>
> For now, I have removed the compatibility suite from the suites being
> run and that has gotten rid of the error.
>
> thanks,
> Mamta

Mime
View raw message