You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Danoja Dias <da...@gmail.com> on 2016/05/05 19:15:28 UTC
Running Regression Tests
Hi All,
*I ran following code to run all tests, java junit.textui.TestRunner
<http://wiki.apache.org/db-derby/TestRunner>
org.apache.derbyTesting.functionTests.suites.All*
*But I get this message .Failed to invoke class
org.apache.derbyTesting.functionTests.tests.lang._Suitejava.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497) at
org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
at
org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:60)
at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497) 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.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer at
org.apache.derbyTesting.functionTests.tests.lang.LuceneSuite.suite(LuceneSuite.java:66)
at
org.apache.derbyTesting.functionTests.tests.lang._Suite.suite(_Suite.java:258)
... 14 moreCaused by: java.lang.ClassNotFoundException:
org.apache.lucene.analysis.Analyzer at
java.net.URLClassLoader.findClass(URLClassLoader.java:381) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 16 moreFailed
to invoke suite():java.lang.reflect.InvocationTargetException*
*What am I doing worng? Why is this message comes?*
--
Thanks,
Best Regards,
Danoja Dias.
Re: Running Regression Tests
Posted by Bryan Pendleton <bp...@gmail.com>.
>> I ran following code to run all tests,
>> java junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All
>>
>> Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.Analyzer
I generally use "ant" to run the tests, precisely because the Ant build.xml
file takes care of all the complicated classpath setup for me.
You can find some good documentation on this approach here:
https://wiki.apache.org/db-derby/DerbyJUnitTesting#Running_tests_using_ant_in_a_code_line
thanks,
bryan
Re: Running Regression Tests
Posted by Bryan Pendleton <bp...@gmail.com>.
> I did it using ant as mentioned in the documentation you sent.
> I ran,
> ant -Dderby.junit.testclass=org.apache.derbyTesting.functionTests.suites.All junit-all-codeline-jars
>
> It is working now. Am I doing right?
Great!
It should print a series of lines to the screen, as it runs each test.
And, at the end, there will be a report produced, that summarizes
all the tests that were run, and which ones succeeded and failed.
It may take a few hours, so you probably want to do something else
during the meantime.
If you can attach your diff with the changes you have made as a patch
to DERBY-3181, I can apply your patch on my system, and run some
tests too, and then we can compare the results.
thanks,
bryan
Re: Running Regression Tests
Posted by Danoja Dias <da...@gmail.com>.
Hi bryan,
I did it using ant as mentioned in the documentation you sent.
I ran,
ant
-Dderby.junit.testclass=org.apache.derbyTesting.functionTests.suites.All
junit-all-codeline-jars
It is working now. Am I doing right?
Thanks
On Fri, May 6, 2016 at 8:37 AM, Bryan Pendleton <bp...@gmail.com>
wrote:
>
> Thanks for your reply. But again I get similier kind of error.
>>
>
> Caused by: java.lang.ClassNotFoundException: org.json.simple.JSONArray
>>
>
> Similar, but this is a different class than before.
>
> This class is in json_simple-1.1.jar in your tools/java directory
> in your Derby source tree.
>
> So now add /home/danny/Derby/trunk/tools/java/json_simple-1.1.jar
> to your CLASSPATH and try again.
>
> bryan
>
>
>
--
Thanks,
Best Regards,
Danoja Dias.
Re: Running Regression Tests
Posted by Bryan Pendleton <bp...@gmail.com>.
> Thanks for your reply. But again I get similier kind of error.
> Caused by: java.lang.ClassNotFoundException: org.json.simple.JSONArray
Similar, but this is a different class than before.
This class is in json_simple-1.1.jar in your tools/java directory
in your Derby source tree.
So now add /home/danny/Derby/trunk/tools/java/json_simple-1.1.jar
to your CLASSPATH and try again.
bryan
Re: Running Regression Tests
Posted by Danoja Dias <da...@gmail.com>.
Hi Rick,
Thanks for your reply. But again I get similier kind of error.
Failed to invoke class
org.apache.derbyTesting.functionTests.tests.lang._Suite
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
at
org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:60)
at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.NoClassDefFoundError: org/json/simple/JSONArray
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at junit.framework.TestSuite.<init>(TestSuite.java:138)
at
org.apache.derbyTesting.junit.BaseTestSuite.orderedSuite(BaseTestSuite.java:68)
at
org.apache.derbyTesting.junit.BaseTestSuite.<init>(BaseTestSuite.java:51)
at
org.apache.derbyTesting.junit.TestConfiguration.embeddedSuite(TestConfiguration.java:420)
at
org.apache.derbyTesting.junit.TestConfiguration.defaultSuite(TestConfiguration.java:252)
at
org.apache.derbyTesting.junit.TestConfiguration.defaultSuite(TestConfiguration.java:233)
at
org.apache.derbyTesting.functionTests.tests.lang.SimpleJsonTest.suite(SimpleJsonTest.java:94)
at
org.apache.derbyTesting.functionTests.tests.lang.JsonSuite.suite(JsonSuite.java:59)
at
org.apache.derbyTesting.functionTests.tests.lang._Suite.suite(_Suite.java:259)
... 14 more
Caused by: java.lang.ClassNotFoundException: org.json.simple.JSONArray
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 26 more
my classpath is this.
CLASSPATH=.:/home/danny/Derby/trunk/jars/sane/derby.jar:/home/danny/Derby/trunk/jars/sane/derbyrun.jar:/home/danny/Derby/trunk/jars/sane/derbyTesting.jar:/home/danny/Derby/trunk/jars/sane/derbytools.jar:/home/danny/Derby/trunk/jars/sane/derbynet.jar:/home/danny/Derby/trunk/jars/sane/derbyclient.jar:/home/danny/Derby/trunk/tools/java/junit.jar:/home/danny/Derby/trunk/tools/java/lucene-analyzers-common.jar:/home/danny/Derby/trunk/tools/java/lucene-core.jar:/home/danny/Derby/trunk/tools/java/lucene-queryparser.jar
What am I missing?
What does this error indicate?
thanks.
On Fri, May 6, 2016 at 6:20 AM, Rick Hillegas <ri...@gmail.com>
wrote:
> On 5/5/16 12:15 PM, Danoja Dias wrote:
>
>
> Hi All,
>
>
>
>
> * I ran following code to run all tests, java junit.textui.TestRunner
> <http://wiki.apache.org/db-derby/TestRunner>
> org.apache.derbyTesting.functionTests.suites.All *
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *But I get this message . Failed to invoke class
> org.apache.derbyTesting.functionTests.tests.lang._Suite
> java.lang.reflect.InvocationTargetException at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497) at
> org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
> at
> org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:60)
> at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:50)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497) 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.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer at
> org.apache.derbyTesting.functionTests.tests.lang.LuceneSuite.suite(LuceneSuite.java:66)
> at
> org.apache.derbyTesting.functionTests.tests.lang._Suite.suite(_Suite.java:258)
> ... 14 more Caused by: java.lang.ClassNotFoundException:
> org.apache.lucene.analysis.Analyzer at
> java.net.URLClassLoader.findClass(URLClassLoader.java:381) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 16 more
> Failed to invoke suite():java.lang.reflect.InvocationTargetException *
> *What am I doing worng? Why is this message comes?*
> --
> Thanks,
> Best Regards,
> Danoja Dias.
>
> Hi Danoja,
>
> This error indicates that your classpath does not include the lucene jar
> files which are in the source tree at
>
> tools/java/lucene-analyzers-common.jar
> tools/java/lucene-core.jar
> tools/java/lucene-queryparser.jar
>
> Hope this helps,
> -Rick
>
>
--
Thanks,
Best Regards,
Danoja Dias.
Re: Running Regression Tests
Posted by Rick Hillegas <ri...@gmail.com>.
On 5/5/16 12:15 PM, Danoja Dias wrote:
>
> Hi All,
> /
> I ran following code to run all tests,
> java junit.textui.TestRunner
> <http://wiki.apache.org/db-derby/TestRunner>
> org.apache.derbyTesting.functionTests.suites.All
>
> /
> /But I get this message .
> Failed to invoke class
> org.apache.derbyTesting.functionTests.tests.lang._Suite
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
> at
> org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:60)
> at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:50)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> 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.NoClassDefFoundError:
> org/apache/lucene/analysis/Analyzer
> at
> org.apache.derbyTesting.functionTests.tests.lang.LuceneSuite.suite(LuceneSuite.java:66)
> at
> org.apache.derbyTesting.functionTests.tests.lang._Suite.suite(_Suite.java:258)
> ... 14 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.lucene.analysis.Analyzer
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 16 more
> Failed to invoke suite():java.lang.reflect.InvocationTargetException
>
>
> /
> /What am I doing worng? Why is this message comes?/
> --
> Thanks,
> Best Regards,
> Danoja Dias.
Hi Danoja,
This error indicates that your classpath does not include the lucene jar
files which are in the source tree at
tools/java/lucene-analyzers-common.jar
tools/java/lucene-core.jar
tools/java/lucene-queryparser.jar
Hope this helps,
-Rick