-----Original Message-----
From: Xin, Wayne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 October, 2001 18:02
To: 'Avalon Development'
Subject: apology - Re: Simple test failed to run.I would like to apologize for the disturbance I caused on this list. I admit I'm not participating the Avalon development project. The only purpose I joined this list is that I wish to use Avalon's scheduler and didn't find enough info from Avalon's web page. I'm NOT developing any tools using Apache's source code.
I didn't compile all the source code. That's why I couldn't debug the NPE.
I'd like to make one coding standard suggestion: never make your client to catch a java.lang.Exception. If it's meant to be a runtime exception (a bug), either throw an AvalonRuntimeException (which may provide meaningful info) if you can forsee it or don't throw anything (a true runtime).
I'd like to thank those who offered help out of their busy work (Peter, Eung-ju, Uli etc). Again, sorry for the distraction.
-Wayne Xin
-----Original Message-----
From: Paul Hammant [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 10, 2001 3:19 AM
To: Avalon Development
Subject: Re: Simple test failed to run.
Wayne,
With respect you should have the skills to chase the cause of a NPE
yourself. Please use traditional debuging techniques
(System.out.println(..)) until you know what is wrong. If then it turns
out that our code is wrong, you can supply a patch. This is not a forum
for free support for you developing the alpha stages of your own tool.
There are lots of people here who are very busy, and frankly you've
asked way more questions than provided considered observations or code.Regards,
- Paul H
> I got a NullPointerException when trying to run the a simple test
> class on DefaultTimeScheduler.start(). Since I don't have an example,
> I'm hoping someone can tell me what went wrong.
>
> ------------------------- error output ---------------------------
> C:\MySoftwares\jbuilder5\jdk1.3\bin\javaw -classpath
> "C:\Personal\projects\Aim\Scheduler\AvalonSchedulerTest\classes;C:\Personal\projects\Aim\Scheduler\jakarta-avalon-cornerstone\lib\avalon-framework.jar;C:\Personal\projects\Aim\Scheduler\jakarta-avalon-cornerstone\build\lib\cornerstone.jar;C:\Personal\projects\Aim\Scheduler\jakarta-avalon-cornerstone\build\lib\phoenix-client.jar;C:\Personal\projects\Aim\Scheduler\jakarta-avalon-cornerstone\build\lib\avalon-excalibur-4.0.jar;C:\MySoftwares\jbuilder5\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\MySoftwares\jbuilder5\jdk1.3\jre\lib\i18n.jar;C:\MySoftwares\jbuilder5\jdk1.3\jre\lib\jaws.jar;C:\MySoftwares\jbuilder5\jdk1.3\jre\lib\rt.jar;C:\MySoftwares\jbuilder5\jdk1.3\jre\lib\sunrsasign.jar;C:\MySoftwares\jbuilder5\jdk1.3\lib\dt.jar;C:\MySoftwares\jbuilder5\jdk1.3\lib\tools.jar"> AvalonSchedulerTest
>
> java.lang.NullPointerException at
> org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler.start(DefaultTimeScheduler.java:208)
> at AvalonSchedulerTest.main(AvalonSchedulerTest.java:30)
>
> --------------------------- end error output -----------------------
>
> --------------------------- my simple test --------------------------
> import org.apache.avalon.cornerstone.services.scheduler.Target;
> import org.apache.avalon.cornerstone.services.scheduler.TimeTrigger;
> import org.apache.avalon.cornerstone.services.scheduler.TimeScheduler;
> import
> org.apache.avalon.cornerstone.services.scheduler.PeriodicTimeTrigger;
> import
> org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler;
>
> public class AvalonSchedulerTest
> {
> public static void main( String[] args )
> {
> // AvalonSchedulerTest ast = new AvalonSchedulerTest();
> Target aTarget = new Target() {
> public void targetTriggered(String triggerName)
> {
> System.out.println("Event happening - " + triggerName);
> }
> };
> TimeTrigger aTrigger = new PeriodicTimeTrigger(1000, 1000);
> DefaultTimeScheduler dts = new DefaultTimeScheduler();
> dts.initialize();
> dts.addTrigger("A Trigger", aTrigger, (Target) aTarget);
>
> try
> {
> dts.start();
> } catch (Exception ex)
> {
> ex.printStackTrace();
> }
>
> }
>
> }
>
> -Wayne Xin
>
> -----Original Message-----
> From: Uli Mayring [mailto:[EMAIL PROTECTED] ]
> Sent: Monday, October 08, 2001 1:39 PM
> To: Avalon Development
> Subject: Re: Cornerstone & scheduler
>
>
> On Mon, 8 Oct 2001, Xin, Wayne wrote:
>
> > I'm wondering what timeframe the Avalon/Cornerstone is going to be
> ready.
> > Actually, I only need a simple java based scheduler. If you know any
> other
> > projects that contains this mechanism, please let me know. Thank you.
>
> You can use Avalon if you only need the scheduler, it seems to work quite
> well. However, there is no documentation for it, just an example program.
>
> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, Softwareentwicklung
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Title: apology - Re: Simple test failed to run.
Wayne:
Ok .. I would not
apologise for this .. if Avalon components are up to scratch you
should
not be getting
NVEs. You should not need to be debugging. You should be getting
concise, clear
exceptions that tell you where you screw up.
Cheers,
Steve.
- apology - Re: Simple test failed to run. Xin, Wayne
- Re: apology - Re: Simple test failed to run. Stephen McConnell
- Re: apology - Re: Simple test failed to run. Paul Hammant
