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 Tiago Espinha <ti...@yahoo.co.uk> on 2010/04/10 13:00:17 UTC

Fw: Juni Tests

Hello Nirmal,

It is usually best to ask questions on the list as then everyone can have a go at helping you. That's why I'm forwarding this to the list in case you have any further questions.

As for this question, you have a typo on the class name for junit, it should be "junit.textui.TestRunner" (notice, textui and not testui).

Hope it helps,
Tiago


----- Forwarded Message ----
From: Nirmal Fernando <ni...@gmail.com>
To: Tiago Espinha <ti...@yahoo.co.uk>
Sent: Sat, 10 April, 2010 11:53:28
Subject: Juni Tests

Hi Tiago,

Sorry for disturbing you. I have another question.

When I issued java junit.testui.TestRunner org.apache.derbyTesting.functionTests.suites.All I got an error :(.

C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.testui.TestRunner org.apache.d
erbyTesting.functionTests.suites.All
Exception in thread "main" java.lang.NoClassDefFoundError: junit/testui/TestRunn
er
Caused by: java.lang.ClassNotFoundException: junit.testui.TestRunner
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: junit.testui.TestRunner.  Program will exit.


You have any idea how can I overcome this??

Thank you very much !!!
-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



      

Re: Fw: Juni Tests

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
On 04/10/10 01:37 PM, Nirmal Fernando wrote:
> Hi Tiago,
>
> Yes, I have placed it tools/java. Can you think of any other reason?

Hi Nirmal,

The files in tools/java don't automatically get placed on the classpath.
You need to add it to your CLASSPATH environment variable too, or add it
to the -cp argument you pass to java. See the example here:
http://wiki.apache.org/db-derby/DerbyJUnitTesting#batch_run

-- 
Knut Anders


Re: Juni Tests

Posted by Tiago Espinha <ti...@yahoo.co.uk>.
Hello Nirmal,

I think it was you who is using Cygwin and if that's the case, be careful. Even if you're under Cygwin, you are actually using the Windows JDK, and as such you need to make sure that you are setting the classpath correctly.

Kathey set Cygwin up yesterday and I think she told me that both formats are supported, but one of them needs the slashes to be escaped (I think it's the case where you use such paths as C:\something\something_else).

Anyway, that error is clearly the JDK not finding the JUnit jar, so can you do an:

echo $CLASSPATH

and show here what you get?

Regards,
Tiago



________________________________
From: Nirmal Fernando <ni...@gmail.com>
To: derby-dev@db.apache.org
Sent: Sat, 10 April, 2010 16:15:13
Subject: Fw: Juni Tests




---------- Forwarded message ----------
From: Nirmal Fernando <ni...@gmail.com>
Date: Sat, Apr 10, 2010 at 8:43 PM
Subject: Re: Fw: Juni Tests
To: derby-dev@db.apache.org


Hi Bryan & Knut,

Thanks for your reply. But unfortunately it still not working. Following is the junitAll.out file content:

java.lang.NoClassDefFoundError: junit/textui/TestRunner
Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: junit.textui.TestRunner.  Program will exit.
Exception in thread "main" 


I set all the environment variables needed in CLASSPATH manually, and set the CLASSPATH manually as well.

Thanks!!! 


On Sat, Apr 10, 2010 at 8:12 PM, Bryan Pendleton <bp...@gmail.com> wrote:

>
>Nirmal Fernando wrote:
>
>>>Yes, I have placed it tools/java. Can you think of any other reason?
>>
>>
>>On Sat, Apr 10, 2010 at 4:58 PM, Tiago Espinha <tiago.derby@yahoo.co.uk     Did you place the JUnit jar in the classpath? That error basically
>>
>>>>    says that Java isn't finding the JUnit classes, so make sure you
>>>>    have included it.
>>
>>Hi Nirmal,
>
>>Just placing the jar file into tools/java does not automatically include
>>it in your classpath. You have to either set CLASSPATH environment variable
>>or set the -cp flag when running java.
>
>>Try something like:
>
>>CLASSPATH=$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$jardir/derbyrun.jar:$jardir/derbyTesting.jar
>>export CLASSPATH
>>echo "classpath=$CLASSPATH"
>
>>java -Xmx512m -XX:MaxPermSize=128m junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All >junitAll.out 2>&1
>
>>thanks,
>
>>bryan
>
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



      

Re: Fw: Juni Tests

Posted by Ян Программист <we...@gmail.com>.
Tnx. I will check. John

2010/4/10 Bryan Pendleton <bp...@gmail.com>

> These are the CLASSPATH variable's values:
>>
>>
>> $jardir/derby.jar:$jardir/derbytools.jar:$jardir/derbyrun.jar:$jardir/derbynet.jar:$jardir/derbyclient.jar:$jardir/derbyTesting.jar:$tstjardir/jakarta-oro-2.0.8.jar:$tstjardir/junit.jar:$jardir/derbyLocale_cs.jar:$jardir/derbyLocale_de_DE.jar:$jardir/derbyLocale_es.jar:$jardir/derbyLocale_fr.jar:$jardir/derbyLocale_hu.jar:$jardir/derbyLocale_it.jar:$jardir/derbyLocale_ja_JP.jar:$jardir/derbyLocale_ko_KR.jar:$jardir/derbyLocale_pl.jar:$jardir/derbyLocale_pt_BR.jar:$jardir/derbyLocale_ru.jar:$jardir/derbyLocale_zh_CN.jar:$jardir/derbyLocale_zh_TW.jar:$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$CLASSPATH
>>
>
> Is that the *exact* response from "echo $CLASSPATH"?
>
> If so, then you need to set the "jardir", "tooljardir" and "tstjardir"
> variables before you set classpath.
>
>        echo $CLASSPATH
>
> should show the exact true system file paths of those jar files, with no
> un-expanded variables names in the setting.
>
> thanks,
>
> bryan
>
>

Re: Fw: Juni Tests

Posted by Ян Программист <we...@gmail.com>.
Yeap, that evil ':' vs ';' thing! John

2010/4/10 Nirmal Fernando <ni...@gmail.com>

> Hi All,
>
> I think I found the reason, it's just that I'm using Windows Vista not
> Unix.
>
> So in Windows my CLASSPATH variable's value should be following:
>
>
> %jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>
> Note: *In Windows you have to use %aa% instead of $aa and ";" instead of
> ":".*
> *
> *
> *
> *
> *
> Now I'm running Suites.All !! :) Usually how long will take to last?
>
> Thanks for all of you for your replies !!!
>
>
> *
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>

Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
HI Tiago,

Thanks... I was wondering what it is :D !!




On Sun, Apr 11, 2010 at 3:12 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:

> Hello Nirmal,
>
> You have run a regression test already :-) in fact you've run the whole
> bunch of them! The normal unit tests are what we call regression tests,
> because they test features as they are supposed to be implemented. So if you
> (or anyone else) makes a change that inadvertently changes the normal
> behavior, one of these tests (on suites.All) will fail and then we say we've
> had a regression failure.
>
> Also, when you implement something completely new, you're supposed to
> create a new test that tests that feature. So that in the future if someone
> breaks that, your test will fail, letting that person know that they've
> broken it.
>
> Hope that helps,
> Tiago
>
> ------------------------------
> *From:* Nirmal Fernando <ni...@gmail.com>
> *To:* derby-dev@db.apache.org
> *Sent:* Sun, 11 April, 2010 6:05:23
>
> *Subject:* Re: Fw: Juni Tests
>
>
> Hi Kristian,
>
> Thanks for the very clear explanations on testing Derby !!!
>
> I'm quite new to the Derby community, but I think I'm learning many from
> all of your replies.
>
> I have another question, I haven't run a regression test yet. I would be
> grateful if someone help me to run a regression test.
>
>
> Thanks !!!!
>
>
>
> On Sun, Apr 11, 2010 at 12:09 AM, Kristian Waagan <Kristian.Waagan@sun.com
> > wrote:
>
>>  On10.04.2010 18:37, Nirmal Fernando wrote:
>>
>> Thanks Tiago !!
>>
>>  Ya, I ran the command that Bryan had posted few mails ago. It included
>> those maximizing memory allocation.
>>
>>  By the way, at what times we need to run suites.All? Is it only when we
>> create a patch?
>>
>>
>> I run suites.All with as good as every patch I commit.
>> The exceptions are JavaDoc changes only, or other trivial changes.
>> Sometimes I have committed what I believed was trivial changes, and then one
>> or more tests failed in the nightly tests run by members of the community...
>> Sometimes tests fail on some platforms only, so you may see failures in the
>> nightlies even if the tests passed on your own machine.
>> Running the regression tests is a good way to root out problems with
>> patches early on.
>>
>> If you're working on a patch and you know specific tests are failing
>> (maybe after running suites.All for the first time), it is better to keep
>> running the specific test(s) until the errors have been corrected, otherwise
>> your iterations will take a very long time. When you feel the code is ready,
>> you can start the full suite again.
>> For JUnit, run
>> org.apache.derbyTesting.functionTests.tests.[directory]._Suite to run all
>> tests within the specified directory (a Derby convention).
>>
>> As I mentioned above, some people run suites.All every day and post the
>> results to derby-dev. For instance, see Ole's results at
>> http://dbtg.foundry.sun.com/derby/test/ .
>> As a developer, unless you have a special interest in testing, running the
>> regression tests when you test patches should be sufficient.
>> Sometimes running the tests with a clean code base is helpful to verify
>> that the tests are running fine on your machine.
>>
>>
>> Regards,
>> --
>> Kristian
>>
>>
>>
>>
>>  Thanks!!!
>>
>> On Sat, Apr 10, 2010 at 9:56 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:
>>
>>>  Hello Nirmal,
>>>
>>>  I'm glad that you finally got it running. The how long tests take to
>>> run depends a lot on the machine you're running them on and even on the
>>> operating system. There are a few tests that if I recall correctly take ages
>>> on Windows but are much faster on *nix systems.
>>>
>>>  Since you're running them on Windows and with an average dual core
>>> computer, you're looking at at least 3 or 4 hours for the whole suites.All.
>>>
>>>  Also be wary that if this:
>>>
>>>  java junit.testui.TestRunner
>>> org.apache.derbyTesting.functionTests.suites.All
>>>
>>>  is the way you're running your suites.All, your run will most certainly
>>> fail. There are some tests in suites. All that require a great deal of
>>> memory and it's easy to exhaust the 128Mb(?) limit imposed by default on
>>> each JVM.
>>>
>>>  Here's what I use:
>>>
>>>  java -Xms128m -Xmx1024m -XX:MaxPermSize=512m junit.textui.TestRunner
>>> org.apache.derbyTesting.functionTests.suites.All
>>>
>>>  I start with 128Mb of memory allocated, allow it to expand to 1Gb and
>>> that last argument I believe has to do with the size of the heap, as it does
>>> run out for some of the tests as well.
>>>
>>>  Hope it helps,
>>> Tiago
>>>
>>>  ------------------------------
>>> *From:* Nirmal Fernando <ni...@gmail.com>
>>>  *To:* derby-dev@db.apache.org
>>>  *Sent:* Sat, 10 April, 2010 17:17:33
>>>
>>> *Subject:* Re: Fw: Juni Tests
>>>
>>> Hi All,
>>>
>>>  I think I found the reason, it's just that I'm using Windows Vista not
>>> Unix.
>>>
>>>  So in Windows my CLASSPATH variable's value should be following:
>>>
>>>
>>> %jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>>>
>>>  Note: *In Windows you have to use %aa% instead of $aa and ";" instead
>>> of ":".*
>>> *
>>> *
>>> *
>>> *
>>> *
>>> Now I'm running Suites.All !! :) Usually how long will take to last?
>>>
>>>  Thanks for all of you for your replies !!!
>>>
>>>
>>>  *
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> C.S.Nirmal J. Fernando
>>> Department of Computer Science & Engineering,
>>> Faculty of Engineering,
>>> University of Moratuwa,
>>> Sri Lanka.
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> C.S.Nirmal J. Fernando
>> Department of Computer Science & Engineering,
>> Faculty of Engineering,
>> University of Moratuwa,
>> Sri Lanka.
>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Re: Fw: Juni Tests

Posted by Tiago Espinha <ti...@yahoo.co.uk>.
Hello Nirmal,

You have run a regression test already :-) in fact you've run the whole bunch of them! The normal unit tests are what we call regression tests, because they test features as they are supposed to be implemented. So if you (or anyone else) makes a change that inadvertently changes the normal behavior, one of these tests (on suites.All) will fail and then we say we've had a regression failure.

Also, when you implement something completely new, you're supposed to create a new test that tests that feature. So that in the future if someone breaks that, your test will fail, letting that person know that they've broken it.

Hope that helps,
Tiago



________________________________
From: Nirmal Fernando <ni...@gmail.com>
To: derby-dev@db.apache.org
Sent: Sun, 11 April, 2010 6:05:23
Subject: Re: Fw: Juni Tests


Hi Kristian,

Thanks for the very clear explanations on testing Derby !!!

I'm quite new to the Derby community, but I think I'm learning many from all of your replies.

I have another question, I haven't run a regression test yet. I would be grateful if someone help me to run a regression test.


Thanks !!!!




On Sun, Apr 11, 2010 at 12:09 AM, Kristian Waagan <Kr...@sun.com> wrote:

>
>
>  
>
>
>>On10.04.2010 18:37, Nirmal Fernando wrote:
>
>Thanks Tiago !!
>> 
>>
>>
>>Ya, I ran the command that Bryan had posted few mails ago. It
>>included those maximizing memory allocation. 
>>
>>
>>By the way, at what times we need to run suites.All? Is it only
>>when we create a patch?
>
>I run suites.All with as good as every patch I commit.
>>The exceptions are JavaDoc changes only, or other trivial changes.
>Sometimes I have committed what I believed was trivial changes, and
>then one or more tests failed in the nightly tests run by members of
>the community... Sometimes tests fail on some platforms only, so you
>may see failures in the nightlies even if the tests passed on your own
>machine.
>>Running the regression tests is a good way to root out problems with
>patches early on.
>
>>If you're working on a patch and you know specific tests are failing
>(maybe after running suites.All for the first time), it is better to
>keep running the specific test(s) until the errors have been corrected,
>otherwise your iterations will take a very long time. When you feel the
>code is ready, you can start the full suite again.
>>For JUnit, run
>org.apache.derbyTesting.functionTests.tests.[directory]._Suite to run
>all tests within the specified directory (a Derby convention).
>
>>As I mentioned above, some people run suites.All every day and post the
>results to derby-dev. For instance, see Ole's results at
>http://dbtg.foundry.sun.com/derby/test/ .
>>As a developer, unless you have a special interest in testing, running
>the regression tests when you test patches should be sufficient. 
>>Sometimes running the tests with a clean code base is helpful to verify
>that the tests are running fine on your machine.
>
>
>>Regards,
>>-- 
>>Kristian
>
>
>
>
>>
>>
>>
>>Thanks!!!
>>
>>
>>On Sat, Apr 10, 2010 at 9:56 PM, Tiago
>>Espinha <ti...@yahoo.co.uk> >>wrote:
>>
>>Hello Nirmal,
>>>
>>>
>>>I'm glad that you finally got it running. The how long tests
>>>take to run depends a lot on the machine you're running them on and
>>>even on the operating system. There are a few tests that if I recall
>>>correctly take ages on Windows but are much faster on *nix systems.
>>>
>>>
>>>Since you're running them on Windows and with an average dual
>>>core computer, you're looking at at least 3 or 4 hours for the whole
>>>suites.All.
>>>
>>>
>>>Also be wary that if this:
>>>
>>>
>>>java junit.testui.TestRunner
>>>org.apache.derbyTesting.functionTests.suites.All
>>>
>>>
>>>is
>>>the way you're running your suites.All, your run will most certainly
>>>fail. There are some tests in suites. All that require a great deal of
>>>memory and it's easy to exhaust the 128Mb(?) limit imposed by default
>>>on each JVM.
>>>
>>>
>>>Here's
>>>what I use:
>>>
>>>
>>>java
>>>-Xms128m -Xmx1024m -XX:MaxPermSize=512m junit.textui.TestRunner
>>>org.apache.derbyTesting.functionTests.suites.All
>>>
>>>
>>>I
>>>start with 128Mb of memory allocated, allow it to expand to 1Gb and
>>>that last argument I believe has to do with the size of the heap, as it
>>>does run out for some of the tests as well.
>>>
>>>
>>>Hope
>>>it helps,
>>>Tiago
>>>
>>>
>>>
________________________________
 
>>>From: >>>Nirmal Fernando <ni...@gmail.com>
>>>
>>>To: derby-dev@db.apache.org
>>>Sent: Sat, 10 April,
>>>2010 17:17:33
>>> 
>>>
>>>Subject: Re: Fw:
>>>Juni Tests
>>> 
>>>
>>>Hi
>>>All, 
>>>
>>>
>>>I
>>>think I found the reason, it's just that I'm using Windows Vista not
>>>Unix.  
>>>
>>>
>>>So
>>>in Windows my CLASSPATH variable's value should be following:
>>>
>>>
>>>%jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>>>
>>>
>>>Note: In
>>>Windows you have to use %aa% instead of $aa and ";" instead of ":".
>>>
>>>
>>>
>>>
>>>Now I'm running Suites.All !! :) Usually how long will take to
>>>last? 
>>>
>>>
>>>Thanks for all of you for your replies !!!
>>>
>>>
>>>
>>>
>>>-- 
>>>>>>Best Regards,
>>>>>>Nirmal
>>>
>>>>>>C.S.Nirmal J. Fernando
>>>>>>Department of Computer Science & Engineering,
>>>>>>Faculty of Engineering,
>>>>>>University of Moratuwa,
>>>>>>Sri Lanka.
>>>
>>>
>>
>>
>>>>-- 
>>>>Best Regards,
>>>>Nirmal
>>
>>>>C.S.Nirmal J. Fernando
>>>>Department of Computer Science & Engineering,
>>>>Faculty of Engineering,
>>>>University of Moratuwa,
>>>>Sri Lanka.
>>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



      

Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Kristian,

Thanks for the very clear explanations on testing Derby !!!

I'm quite new to the Derby community, but I think I'm learning many from all
of your replies.

I have another question, I haven't run a regression test yet. I would be
grateful if someone help me to run a regression test.


Thanks !!!!



On Sun, Apr 11, 2010 at 12:09 AM, Kristian Waagan
<Kr...@sun.com>wrote:

>  On10.04.2010 18:37, Nirmal Fernando wrote:
>
> Thanks Tiago !!
>
>  Ya, I ran the command that Bryan had posted few mails ago. It included
> those maximizing memory allocation.
>
>  By the way, at what times we need to run suites.All? Is it only when we
> create a patch?
>
>
> I run suites.All with as good as every patch I commit.
> The exceptions are JavaDoc changes only, or other trivial changes.
> Sometimes I have committed what I believed was trivial changes, and then one
> or more tests failed in the nightly tests run by members of the community...
> Sometimes tests fail on some platforms only, so you may see failures in the
> nightlies even if the tests passed on your own machine.
> Running the regression tests is a good way to root out problems with
> patches early on.
>
> If you're working on a patch and you know specific tests are failing (maybe
> after running suites.All for the first time), it is better to keep running
> the specific test(s) until the errors have been corrected, otherwise your
> iterations will take a very long time. When you feel the code is ready, you
> can start the full suite again.
> For JUnit, run
> org.apache.derbyTesting.functionTests.tests.[directory]._Suite to run all
> tests within the specified directory (a Derby convention).
>
> As I mentioned above, some people run suites.All every day and post the
> results to derby-dev. For instance, see Ole's results at
> http://dbtg.foundry.sun.com/derby/test/ .
> As a developer, unless you have a special interest in testing, running the
> regression tests when you test patches should be sufficient.
> Sometimes running the tests with a clean code base is helpful to verify
> that the tests are running fine on your machine.
>
>
> Regards,
> --
> Kristian
>
>
>
>
>  Thanks!!!
>
> On Sat, Apr 10, 2010 at 9:56 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:
>
>>  Hello Nirmal,
>>
>>  I'm glad that you finally got it running. The how long tests take to run
>> depends a lot on the machine you're running them on and even on the
>> operating system. There are a few tests that if I recall correctly take ages
>> on Windows but are much faster on *nix systems.
>>
>>  Since you're running them on Windows and with an average dual core
>> computer, you're looking at at least 3 or 4 hours for the whole suites.All.
>>
>>  Also be wary that if this:
>>
>>  java junit.testui.TestRunner
>> org.apache.derbyTesting.functionTests.suites.All
>>
>>  is the way you're running your suites.All, your run will most certainly
>> fail. There are some tests in suites. All that require a great deal of
>> memory and it's easy to exhaust the 128Mb(?) limit imposed by default on
>> each JVM.
>>
>>  Here's what I use:
>>
>>  java -Xms128m -Xmx1024m -XX:MaxPermSize=512m junit.textui.TestRunner
>> org.apache.derbyTesting.functionTests.suites.All
>>
>>  I start with 128Mb of memory allocated, allow it to expand to 1Gb and
>> that last argument I believe has to do with the size of the heap, as it does
>> run out for some of the tests as well.
>>
>>  Hope it helps,
>> Tiago
>>
>>  ------------------------------
>> *From:* Nirmal Fernando <ni...@gmail.com>
>>  *To:* derby-dev@db.apache.org
>>  *Sent:* Sat, 10 April, 2010 17:17:33
>>
>> *Subject:* Re: Fw: Juni Tests
>>
>> Hi All,
>>
>>  I think I found the reason, it's just that I'm using Windows Vista not
>> Unix.
>>
>>  So in Windows my CLASSPATH variable's value should be following:
>>
>>
>> %jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>>
>>  Note: *In Windows you have to use %aa% instead of $aa and ";" instead of
>> ":".*
>> *
>> *
>> *
>> *
>> *
>> Now I'm running Suites.All !! :) Usually how long will take to last?
>>
>>  Thanks for all of you for your replies !!!
>>
>>
>>  *
>> --
>> Best Regards,
>> Nirmal
>>
>> C.S.Nirmal J. Fernando
>> Department of Computer Science & Engineering,
>> Faculty of Engineering,
>> University of Moratuwa,
>> Sri Lanka.
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Re: Fw: Juni Tests

Posted by Kristian Waagan <Kr...@Sun.COM>.
On10.04.2010 18:37, Nirmal Fernando wrote:
> Thanks Tiago !!
>
> Ya, I ran the command that Bryan had posted few mails ago. It included 
> those maximizing memory allocation.
>
> By the way, at what times we need to run suites.All? Is it only when 
> we create a patch?

I run suites.All with as good as every patch I commit.
The exceptions are JavaDoc changes only, or other trivial changes. 
Sometimes I have committed what I believed was trivial changes, and then 
one or more tests failed in the nightly tests run by members of the 
community... Sometimes tests fail on some platforms only, so you may see 
failures in the nightlies even if the tests passed on your own machine.
Running the regression tests is a good way to root out problems with 
patches early on.

If you're working on a patch and you know specific tests are failing 
(maybe after running suites.All for the first time), it is better to 
keep running the specific test(s) until the errors have been corrected, 
otherwise your iterations will take a very long time. When you feel the 
code is ready, you can start the full suite again.
For JUnit, run 
org.apache.derbyTesting.functionTests.tests.[directory]._Suite to run 
all tests within the specified directory (a Derby convention).

As I mentioned above, some people run suites.All every day and post the 
results to derby-dev. For instance, see Ole's results at 
http://dbtg.foundry.sun.com/derby/test/ .
As a developer, unless you have a special interest in testing, running 
the regression tests when you test patches should be sufficient.
Sometimes running the tests with a clean code base is helpful to verify 
that the tests are running fine on your machine.


Regards,
-- 
Kristian

>
>
> Thanks!!!
>
> On Sat, Apr 10, 2010 at 9:56 PM, Tiago Espinha 
> <tiago.derby@yahoo.co.uk <ma...@yahoo.co.uk>> wrote:
>
>     Hello Nirmal,
>
>     I'm glad that you finally got it running. The how long tests take
>     to run depends a lot on the machine you're running them on and
>     even on the operating system. There are a few tests that if I
>     recall correctly take ages on Windows but are much faster on *nix
>     systems.
>
>     Since you're running them on Windows and with an average dual core
>     computer, you're looking at at least 3 or 4 hours for the whole
>     suites.All.
>
>     Also be wary that if this:
>
>     java junit.testui.TestRunner
>     org.apache.derbyTesting.functionTests.suites.All
>
>     is the way you're running your suites.All, your run will most
>     certainly fail. There are some tests in suites. All that require a
>     great deal of memory and it's easy to exhaust the 128Mb(?) limit
>     imposed by default on each JVM.
>
>     Here's what I use:
>
>     java -Xms128m -Xmx1024m -XX:MaxPermSize=512m
>     junit.textui.TestRunner
>     org.apache.derbyTesting.functionTests.suites.All
>
>     I start with 128Mb of memory allocated, allow it to expand to 1Gb
>     and that last argument I believe has to do with the size of the
>     heap, as it does run out for some of the tests as well.
>
>     Hope it helps,
>     Tiago
>
>     ------------------------------------------------------------------------
>     *From:* Nirmal Fernando <nirmal070125@gmail.com
>     <ma...@gmail.com>>
>     *To:* derby-dev@db.apache.org <ma...@db.apache.org>
>     *Sent:* Sat, 10 April, 2010 17:17:33
>
>     *Subject:* Re: Fw: Juni Tests
>
>     Hi All,
>
>     I think I found the reason, it's just that I'm using Windows Vista
>     not Unix.
>
>     So in Windows my CLASSPATH variable's value should be following:
>
>     %jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>
>     Note: *In Windows you have to use %aa% instead of $aa and ";"
>     instead of ":".*
>     *
>     *
>     *
>     *
>     *
>     Now I'm running Suites.All !! :) Usually how long will take to last?
>
>     Thanks for all of you for your replies !!!
>
>
>     *
>     -- 
>     Best Regards,
>     Nirmal
>
>     C.S.Nirmal J. Fernando
>     Department of Computer Science & Engineering,
>     Faculty of Engineering,
>     University of Moratuwa,
>     Sri Lanka.
>
>
>
>
> -- 
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.


Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
Thanks Tiago !!

Ya, I ran the command that Bryan had posted few mails ago. It included those
maximizing memory allocation.

By the way, at what times we need to run suites.All? Is it only when we
create a patch?


Thanks!!!

On Sat, Apr 10, 2010 at 9:56 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:

> Hello Nirmal,
>
> I'm glad that you finally got it running. The how long tests take to run
> depends a lot on the machine you're running them on and even on the
> operating system. There are a few tests that if I recall correctly take ages
> on Windows but are much faster on *nix systems.
>
> Since you're running them on Windows and with an average dual core
> computer, you're looking at at least 3 or 4 hours for the whole suites.All.
>
> Also be wary that if this:
>
> java junit.testui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All
>
> is the way you're running your suites.All, your run will most certainly
> fail. There are some tests in suites. All that require a great deal of
> memory and it's easy to exhaust the 128Mb(?) limit imposed by default on
> each JVM.
>
> Here's what I use:
>
> java -Xms128m -Xmx1024m -XX:MaxPermSize=512m junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All
>
> I start with 128Mb of memory allocated, allow it to expand to 1Gb and that
> last argument I believe has to do with the size of the heap, as it does run
> out for some of the tests as well.
>
> Hope it helps,
> Tiago
>
> ------------------------------
> *From:* Nirmal Fernando <ni...@gmail.com>
> *To:* derby-dev@db.apache.org
> *Sent:* Sat, 10 April, 2010 17:17:33
>
> *Subject:* Re: Fw: Juni Tests
>
> Hi All,
>
> I think I found the reason, it's just that I'm using Windows Vista not
> Unix.
>
> So in Windows my CLASSPATH variable's value should be following:
>
>
> %jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>
> Note: *In Windows you have to use %aa% instead of $aa and ";" instead of
> ":".*
> *
> *
> *
> *
> *
> Now I'm running Suites.All !! :) Usually how long will take to last?
>
> Thanks for all of you for your replies !!!
>
>
> *
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Re: Fw: Juni Tests

Posted by Kristian Waagan <Kr...@Sun.COM>.
On10.04.2010 18:17, Nirmal Fernando wrote:
> Hi All,
>
> I think I found the reason, it's just that I'm using Windows Vista not 
> Unix.
>
> So in Windows my CLASSPATH variable's value should be following:
>
> %jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar
>
> Note: *In Windows you have to use %aa% instead of $aa and ";" instead 
> of ":".*
> *
> *
> *
> *
> *
> Now I'm running Suites.All !! :) Usually how long will take to last?
> *

Hi Nirmal,

On my machines it takes around 2 hours when I run with 
-Dderby.system.durability=test, and I think around 3 hours if I run it 
without.
The setting tells Derby not to wait for an acknowledgement when writing 
stuff to disk. It should be safe for testing, but *do not* use it when 
running in production environments (a warning will be written to 
derby.log when enabling the test mode).


Regards,
-- 
Kristian

> *
>
> Thanks for all of you for your replies !!!
>
>
> *
> -- 
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.


Re: Fw: Juni Tests

Posted by Tiago Espinha <ti...@yahoo.co.uk>.
Hello Nirmal,

I'm glad that you finally got it running. The how long tests take to run depends a lot on the machine you're running them on and even on the operating system. There are a few tests that if I recall correctly take ages on Windows but are much faster on *nix systems.

Since you're running them on Windows and with an average dual core computer, you're looking at at least 3 or 4 hours for the whole suites.All.

Also be wary that if this:

java junit.testui.TestRunner org.apache.derbyTesting.functionTests.suites.All

is the way you're running your suites.All, your run will most certainly fail. There are some tests in suites. All that require a great deal of memory and it's easy to exhaust the 128Mb(?) limit imposed by default on each JVM.

Here's what I use:

java -Xms128m -Xmx1024m -XX:MaxPermSize=512m junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All

I start with 128Mb of memory allocated, allow it to expand to 1Gb and that last argument I believe has to do with the size of the heap, as it does run out for some of the tests as well.

Hope it helps,
Tiago



________________________________
From: Nirmal Fernando <ni...@gmail.com>
To: derby-dev@db.apache.org
Sent: Sat, 10 April, 2010 17:17:33
Subject: Re: Fw: Juni Tests

Hi All,

I think I found the reason, it's just that I'm using Windows Vista not Unix. 

So in Windows my CLASSPATH variable's value should be following:


%jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar

Note: In Windows you have to use %aa% instead of $aa and ";" instead of ":".


Now I'm running Suites.All !! :) Usually how long will take to last? 

Thanks for all of you for your replies !!!

-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



      

Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi All,

I think I found the reason, it's just that I'm using Windows Vista not
Unix.

So in Windows my CLASSPATH variable's value should be following:

%jardir%\derby.jar;%jardir%\derbytools.jar;%jardir%\derbyrun.jar;%jardir%\derbynet.jar;%jardir%\derbyclient.jar;%jardir%\derbyTesting.jar;%tstjardir%\jakarta-oro-2.0.8.jar;%tstjardir%\junit.jar;%jardir%\derbyLocale_cs.jar;%jardir%\derbyLocale_de_DE.jar;%jardir%\derbyLocale_es.jar;%jardir%\derbyLocale_fr.jar;%jardir%\derbyLocale_hu.jar;%jardir%\derbyLocale_it.jar;%jardir%\derbyLocale_ja_JP.jar;%jardir%\derbyLocale_ko_KR.jar;%jardir%\derbyLocale_pl.jar;%jardir%\derbyLocale_pt_BR.jar;%jardir%\derbyLocale_ru.jar;%jardir%\derbyLocale_zh_CN.jar;%jardir%\derbyLocale_zh_TW.jar

Note: *In Windows you have to use %aa% instead of $aa and ";" instead of
":".*
*
*
*
*
*
Now I'm running Suites.All !! :) Usually how long will take to last?

Thanks for all of you for your replies !!!


*
-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Re: Fw: Juni Tests

Posted by Bryan Pendleton <bp...@gmail.com>.
> These are the CLASSPATH variable's values:
> 
> $jardir/derby.jar:$jardir/derbytools.jar:$jardir/derbyrun.jar:$jardir/derbynet.jar:$jardir/derbyclient.jar:$jardir/derbyTesting.jar:$tstjardir/jakarta-oro-2.0.8.jar:$tstjardir/junit.jar:$jardir/derbyLocale_cs.jar:$jardir/derbyLocale_de_DE.jar:$jardir/derbyLocale_es.jar:$jardir/derbyLocale_fr.jar:$jardir/derbyLocale_hu.jar:$jardir/derbyLocale_it.jar:$jardir/derbyLocale_ja_JP.jar:$jardir/derbyLocale_ko_KR.jar:$jardir/derbyLocale_pl.jar:$jardir/derbyLocale_pt_BR.jar:$jardir/derbyLocale_ru.jar:$jardir/derbyLocale_zh_CN.jar:$jardir/derbyLocale_zh_TW.jar:$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$CLASSPATH

Is that the *exact* response from "echo $CLASSPATH"?

If so, then you need to set the "jardir", "tooljardir" and "tstjardir"
variables before you set classpath.

	echo $CLASSPATH

should show the exact true system file paths of those jar files, with no
un-expanded variables names in the setting.

thanks,

bryan


Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi,

These are the CLASSPATH variable's values:

$jardir/derby.jar:$jardir/derbytools.jar:$jardir/derbyrun.jar:$jardir/derbynet.jar:$jardir/derbyclient.jar:$jardir/derbyTesting.jar:$tstjardir/jakarta-oro-2.0.8.jar:$tstjardir/junit.jar:$jardir/derbyLocale_cs.jar:$jardir/derbyLocale_de_DE.jar:$jardir/derbyLocale_es.jar:$jardir/derbyLocale_fr.jar:$jardir/derbyLocale_hu.jar:$jardir/derbyLocale_it.jar:$jardir/derbyLocale_ja_JP.jar:$jardir/derbyLocale_ko_KR.jar:$jardir/derbyLocale_pl.jar:$jardir/derbyLocale_pt_BR.jar:$jardir/derbyLocale_ru.jar:$jardir/derbyLocale_zh_CN.jar:$jardir/derbyLocale_zh_TW.jar:$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$CLASSPATH


Thanks!!

On Sat, Apr 10, 2010 at 8:45 PM, Nirmal Fernando <ni...@gmail.com>wrote:

>
>
> ---------- Forwarded message ----------
> From: Nirmal Fernando <ni...@gmail.com>
> Date: Sat, Apr 10, 2010 at 8:43 PM
> Subject: Re: Fw: Juni Tests
> To: derby-dev@db.apache.org
>
>
> Hi Bryan & Knut,
>
> Thanks for your reply. But unfortunately it still not working. Following is
> the junitAll.out file content:
>
> java.lang.NoClassDefFoundError: junit/textui/TestRunner
> Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
>  at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> Could not find the main class: junit.textui.TestRunner.  Program will exit.
> Exception in thread "main"
>
>
> I set all the environment variables needed in CLASSPATH manually, and set
> the CLASSPATH manually as well.
>
> Thanks!!!
>
> On Sat, Apr 10, 2010 at 8:12 PM, Bryan Pendleton <
> bpendleton.derby@gmail.com> wrote:
>
>> Nirmal Fernando wrote:
>>
>>> Yes, I have placed it tools/java. Can you think of any other reason?
>>>
>>> On Sat, Apr 10, 2010 at 4:58 PM, Tiago Espinha <tiago.derby@yahoo.co.uk    Did you place the JUnit jar in the classpath? That error basically
>>>
>>>    says that Java isn't finding the JUnit classes, so make sure you
>>>    have included it.
>>>
>>
>> Hi Nirmal,
>>
>> Just placing the jar file into tools/java does not automatically include
>> it in your classpath. You have to either set CLASSPATH environment
>> variable
>> or set the -cp flag when running java.
>>
>> Try something like:
>>
>>
>> CLASSPATH=$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$jardir/derbyrun.jar:$jardir/derbyTesting.jar
>> export CLASSPATH
>> echo "classpath=$CLASSPATH"
>>
>> java -Xmx512m -XX:MaxPermSize=128m junit.textui.TestRunner
>> org.apache.derbyTesting.functionTests.suites.All >junitAll.out 2>&1
>>
>> thanks,
>>
>> bryan
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
---------- Forwarded message ----------
From: Nirmal Fernando <ni...@gmail.com>
Date: Sat, Apr 10, 2010 at 8:43 PM
Subject: Re: Fw: Juni Tests
To: derby-dev@db.apache.org


Hi Bryan & Knut,

Thanks for your reply. But unfortunately it still not working. Following is
the junitAll.out file content:

java.lang.NoClassDefFoundError: junit/textui/TestRunner
Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: junit.textui.TestRunner.  Program will exit.
Exception in thread "main"


I set all the environment variables needed in CLASSPATH manually, and set
the CLASSPATH manually as well.

Thanks!!!

On Sat, Apr 10, 2010 at 8:12 PM, Bryan Pendleton <bpendleton.derby@gmail.com
> wrote:

> Nirmal Fernando wrote:
>
>> Yes, I have placed it tools/java. Can you think of any other reason?
>>
>> On Sat, Apr 10, 2010 at 4:58 PM, Tiago Espinha <tiago.derby@yahoo.co.uk
>>   Did you place the JUnit jar in the classpath? That error basically
>>
>>    says that Java isn't finding the JUnit classes, so make sure you
>>    have included it.
>>
>
> Hi Nirmal,
>
> Just placing the jar file into tools/java does not automatically include
> it in your classpath. You have to either set CLASSPATH environment variable
> or set the -cp flag when running java.
>
> Try something like:
>
>
> CLASSPATH=$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$jardir/derbyrun.jar:$jardir/derbyTesting.jar
> export CLASSPATH
> echo "classpath=$CLASSPATH"
>
> java -Xmx512m -XX:MaxPermSize=128m junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All >junitAll.out 2>&1
>
> thanks,
>
> bryan
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Re: Fw: Juni Tests

Posted by Bryan Pendleton <bp...@gmail.com>.
Nirmal Fernando wrote:
> Yes, I have placed it tools/java. Can you think of any other reason?
> 
> On Sat, Apr 10, 2010 at 4:58 PM, Tiago Espinha <tiago.derby@yahoo.co.uk 
>     Did you place the JUnit jar in the classpath? That error basically
>     says that Java isn't finding the JUnit classes, so make sure you
>     have included it.

Hi Nirmal,

Just placing the jar file into tools/java does not automatically include
it in your classpath. You have to either set CLASSPATH environment variable
or set the -cp flag when running java.

Try something like:

CLASSPATH=$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$jardir/derbyrun.jar:$jardir/derbyTesting.jar
export CLASSPATH
echo "classpath=$CLASSPATH"

java -Xmx512m -XX:MaxPermSize=128m junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All >junitAll.out 2>&1

thanks,

bryan


Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Tiago,

Yes, I have placed it tools/java. Can you think of any other reason?

Thanks !!

On Sat, Apr 10, 2010 at 4:58 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:

> Hello Nirmal,
>
> Did you place the JUnit jar in the classpath? That error basically says
> that Java isn't finding the JUnit classes, so make sure you have included
> it.
>
> I usually just place it under tools/java.
>
> Tiago
>
> ------------------------------
> *From:* Nirmal Fernando <ni...@gmail.com>
> *To:* derby-dev@db.apache.org
> *Sent:* Sat, 10 April, 2010 12:13:24
> *Subject:* Re: Fw: Juni Tests
>
> Hi All,
>
> @Tiago: Thanks for the reply & advice.
>
> But still I get the same error.
>
> C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.textui.TestRunner
> org.apache.d
> erbyTesting.functionTests.suites.All
> Exception in thread "main" java.lang.NoClassDefFoundError:
> junit/textui/TestRunn
> er
> Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
>         at java.net.URLClassLoader$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> Could not find the main class: junit.textui.TestRunner.  Program will exit.
>
>
> Can someone help me to overcome this?
>
> Thanks in advance !!!!
>
>
> On Sat, Apr 10, 2010 at 4:30 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:
>
>> Hello Nirmal,
>>
>> It is usually best to ask questions on the list as then everyone can have
>> a go at helping you. That's why I'm forwarding this to the list in case you
>> have any further questions.
>>
>> As for this question, you have a typo on the class name for junit, it
>> should be "junit.textui.TestRunner" (notice, textui and not testui).
>>
>> Hope it helps,
>> Tiago
>>
>> ----- Forwarded Message ----
>> *From:* Nirmal Fernando <ni...@gmail.com>
>> *To:* Tiago Espinha <ti...@yahoo.co.uk>
>> *Sent:* Sat, 10 April, 2010 11:53:28
>> *Subject:* Juni Tests
>>
>> Hi Tiago,
>>
>> Sorry for disturbing you. I have another question.
>>
>> When I issued java junit.testui.TestRunner
>> org.apache.derbyTesting.functionTests.suites.All I got an error :(.
>>
>> C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.testui.TestRunner
>> org.apache.d
>> erbyTesting.functionTests.suites.All
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> junit/testui/TestRunn
>> er
>> Caused by: java.lang.ClassNotFoundException: junit.testui.TestRunner
>>         at java.net.URLClassLoader$1.run(Unknown Source)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at java.net.URLClassLoader.findClass(Unknown Source)
>>         at java.lang.ClassLoader.loadClass(Unknown Source)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>          at java.lang.ClassLoader.loadClass(Unknown Source)
>>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>> Could not find the main class: junit.testui.TestRunner.  Program will
>> exit.
>>
>>
>> You have any idea how can I overcome this??
>>
>> Thank you very much !!!
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> C.S.Nirmal J. Fernando
>> Department of Computer Science & Engineering,
>> Faculty of Engineering,
>> University of Moratuwa,
>> Sri Lanka.
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Re: Fw: Juni Tests

Posted by Tiago Espinha <ti...@yahoo.co.uk>.
Hello Nirmal,

Did you place the JUnit jar in the classpath? That error basically says that Java isn't finding the JUnit classes, so make sure you have included it.

I usually just place it under tools/java.

Tiago



________________________________
From: Nirmal Fernando <ni...@gmail.com>
To: derby-dev@db.apache.org
Sent: Sat, 10 April, 2010 12:13:24
Subject: Re: Fw: Juni Tests

Hi All,

@Tiago: Thanks for the reply & advice.

But still I get the same error. 

C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.textui.TestRunner org.apache.d
erbyTesting.functionTests.suites.All
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunn
er
Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: junit.textui.TestRunner.  Program will exit.


Can someone help me to overcome this?

Thanks in advance !!!!


On Sat, Apr 10, 2010 at 4:30 PM, Tiago Espinha <ti...@yahoo.co.uk> wrote:

Hello Nirmal,
>
>
>It is usually best to ask questions on the list as then everyone can have a go at helping you. That's why I'm forwarding this to the list in case you have any further questions.
>
>
>As for this question, you have a typo on the class name for junit, it should be "junit.textui.TestRunner" (notice, textui and not testui).
>
>
>Hope it helps,
>Tiago
>
>
>----- Forwarded Message ----
>From: Nirmal Fernando <ni...@gmail.com>
>To: Tiago Espinha <ti...@yahoo.co.uk>
>Sent: Sat, 10 April, 2010 11:53:28
>Subject: Juni Tests
>
>Hi Tiago,
>
>
>Sorry for disturbing you. I have another question.
>
>
>When I issued java junit.testui.TestRunner org.apache.derbyTesting.functionTests.suites.All I got an error :(.
>
>
>C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.testui.TestRunner org.apache.d
>erbyTesting.functionTests.suites.All
>Exception in thread "main" java.lang.NoClassDefFoundError: junit/testui/TestRunn
>er
>Caused by: java.lang.ClassNotFoundException: junit.testui.TestRunner
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>Could not find the main class: junit.testui.TestRunner.  Program will exit.
>
>
>
>
>You have any idea how can I overcome this??
>
>
>Thank you very much !!!
>-- 
>Best Regards,
>Nirmal
>
>C.S.Nirmal J. Fernando
>Department of Computer Science & Engineering,
>>
>Faculty of Engineering,
>University of Moratuwa,
>Sri Lanka.
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.



      

Re: Fw: Juni Tests

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi All,

@Tiago: Thanks for the reply & advice.

But still I get the same error.

C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.textui.TestRunner
org.apache.d
erbyTesting.functionTests.suites.All
Exception in thread "main" java.lang.NoClassDefFoundError:
junit/textui/TestRunn
er
Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: junit.textui.TestRunner.  Program will exit.


Can someone help me to overcome this?

Thanks in advance !!!!


On Sat, Apr 10, 2010 at 4:30 PM, Tiago Espinha <ti...@yahoo.co.uk>wrote:

> Hello Nirmal,
>
> It is usually best to ask questions on the list as then everyone can have a
> go at helping you. That's why I'm forwarding this to the list in case you
> have any further questions.
>
> As for this question, you have a typo on the class name for junit, it
> should be "junit.textui.TestRunner" (notice, textui and not testui).
>
> Hope it helps,
> Tiago
>
> ----- Forwarded Message ----
> *From:* Nirmal Fernando <ni...@gmail.com>
> *To:* Tiago Espinha <ti...@yahoo.co.uk>
> *Sent:* Sat, 10 April, 2010 11:53:28
> *Subject:* Juni Tests
>
> Hi Tiago,
>
> Sorry for disturbing you. I have another question.
>
> When I issued java junit.testui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All I got an error :(.
>
> C:\OtherNirmal\GSoC\Testing\suites.ALL>java junit.testui.TestRunner
> org.apache.d
> erbyTesting.functionTests.suites.All
> Exception in thread "main" java.lang.NoClassDefFoundError:
> junit/testui/TestRunn
> er
> Caused by: java.lang.ClassNotFoundException: junit.testui.TestRunner
>         at java.net.URLClassLoader$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> Could not find the main class: junit.testui.TestRunner.  Program will exit.
>
>
> You have any idea how can I overcome this??
>
> Thank you very much !!!
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.