8 Replies Latest reply on Nov 20, 2009 7:25 PM by digdas.seam.digdas.nl

    Difference in JBoss startup and deploy of application

    digdas.seam.digdas.nl

      I am trying to schedule a quartz job from within my war-file.
      This works when I deploy the war file to the server.
      But... When I restart the server I get the following messages:


      13:36:00,016 ERROR [ErrorLogger] Job (DEFAULT.185e4b4a:1250c6d95c3:-7fa0 threw an exception.
      org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
           at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      * Nested Exception (Underlying Cause) ---------------
      java.lang.NullPointerException
           at org.jboss.seam.async.AsynchronousInvocation.call(AsynchronousInvocation.java:45)
           at org.jboss.seam.async.Asynchronous.executeInContexts(Asynchronous.java:76)
           at org.jboss.seam.async.Asynchronous.execute(Asynchronous.java:45)
           at org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher.java:240)
           at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      



      Digging into the code, the org.jboss.seam.async.AsynchonousInvocationCall
      It tries to run a method from a target.


            Object target = Component.getInstance(componentName);
            
            Method method;
            try
            {
               method = target.getClass().getMethod(methodName, argTypes);
      



      The component name is correct, what it is supposed to be.
      The line Object target ... returns null!


      I did follow the example at:
      My Link


      What am I doing wrong?


      Seam 2.0.2SP1
      JBoss 4.2.2GA