Hi,

I am trying to access a service class,e.g. MyService from the Quartz Job
class. I have also written "def myService" in MyNotificationJob i.e. Quartz
Job class and it is having following method

public void execute(JobExecutionContext context) throws
JobExecutionException 

Now I want to access xyz method of MyService and written the following
statement in the above method.

myService.xyz()

but it throws the following error:

java.lang.NullPointerException: Cannot invoke method xyz() on null object
        at
org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
        at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:743)
        at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:720)
        at
org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:17)
        at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)




Please help me out to access a service from my quartz job...... Thanks in
advance.....

-- 
View this message in context: 
http://n4.nabble.com/Cant-Invoke-a-Service-from-Quartz-Job-in-groovy-tp1756043p1756043.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to