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 19:41:53 GMT
On 05.10.2012 20:13, Mamta Satoor wrote:
> Hi Kristian,
>
> Thanks for your reply. Yes, I have always run the tests off of
> classes. I can start building the jars and include derbyrun.jar and
> derbyTesting.jar in my classpath before firing the tests.

I also tend to run off classes if I'm doing quick iterations of 
development, but when I run the full regression tests I always generate 
the jars first.

>
> As for the old released jars for upgrade testing, I very rarely use
> derbyTesting.oldReleasePath(only when I don't have access to the
> internet). I use following to start suites.All and I am assuming, it
> picked up the released jar files from Apache Derby since I didn't
> specify derbyTesting.oldReleasePath. Is it correct that if
> derbyTesting.oldReleasePath is not set, we go to Apache Derby website
> to get the released jars?

That is currently true for the upgrade tests, since it hasn't started 
using the new release repository yet.
Downloading the same static JARs time after time is a waste of 
resources, so I hope we can switch to the new release repository for the 
upgrade tests soon too.

We may have to work on how to make it easy for developers to check out / 
download the old releases.
We may also consider printing a warning if the tests are running with 
the default settings and the newest old release is more than one minor 
version away from trunk. That would warn people if they only have the 
10.8 branch available when running with 10.10. Initiating and updating 
the release repository should be described/mentioned in the testing README.

The release repository is described by DERBY-5475 [1].


-- 
Kristian

[1] https://issues.apache.org/jira/browse/DERBY-5475

>
> time java  -Dderby.tests.trace=true junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All>  runall.out 2>&1
>
> thanks,
> Mamta
>
> On Thu, Oct 4, 2012 at 10:58 PM, Kristian Waagan
> <kristian.waagan@oracle.com>  wrote:
>> 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