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]
