Login  Register

Re: Users - NULL pointer in GenericAsyncEngine

Posted by BJ Freeman on Feb 28, 2006; 2:54pm
URL: http://ofbiz.116.s1.nabble.com/Users-NULL-pointer-in-GenericAsyncEngine-tp137648p137650.html

the try catch was if you have java type service.
if you have a simple service you may have optional set as false for
something that may not have data all the time.

Ran into this when was doing something similar, but the customer
sometimes did not fill all the variables.


BJ Freeman sent the following on 2/28/06 6:39 AM:

> I would say it is the service
>
> Service [checkProductInventoryDiscontinuation] threw an unexpected
> exception/error
> Exception: java.lang.NullPointerException
> Message: null
> looks like a custom service. maybe rap your functions with try and catch.
>
> Fred Forester sent the following on 2/28/06 5:31 AM:
>
>>hi,
>>
>>I am trying to import an InventoryItem record and getting null pointer
>>when trying to run checkProductInventoryDiscontinuation.
>>
>>The error occurs in GenericAsyncEngine.java in runAsync at  
>>dispatcher.getJobManager().runJob(job);  it seems getJobManager is
>>returning null.
>>
>>I added some extra debug info to help me narrow it down.
>>
>>23790 (main) [      EntityEcaRule.java:122:INFO ] Running Entity ECA
>>Service: checkProductInventoryDiscontinuation, triggered by rule on Enti
>>ty: InventoryItem
>>23791 (main) [  ServiceDispatcher.java:465:DEBUG] [[ASync service
>>started...- total:0.0,since last(Begin):0.0]] - 'entity-default / checkProd
>>uctInventoryDiscontinuation'
>>23793 (main) [  ServiceDispatcher.java:486:INFO ]
>>[ServiceDispatcher.runAsync] : engine setup
>>checkProductInventoryDiscontinuation [org/ofbiz
>>/product/inventory/InventoryServices.xml/checkProductInventoryDiscontinuation]
>>(simple)
>>23793 (main) [  ServiceDispatcher.java:504:INFO ]
>>[ServiceDispatcher.runAsync] : transaction started
>>checkProductInventoryDiscontinuation [or
>>g/ofbiz/product/inventory/InventoryServices.xml/checkProductInventoryDiscontinuation]
>>(simple)
>>23794 (main) [  ServiceDispatcher.java:516:INFO ]
>>[ServiceDispatcher.runAsync] : transaction enlisted
>>checkProductInventoryDiscontinuation [o
>>rg/ofbiz/product/inventory/InventoryServices.xml/checkProductInventoryDiscontinuation]
>>(simple)
>>23795 (main) [  ServiceDispatcher.java:529:INFO ]
>>[ServiceDispatcher.runAsync] : authorized  
>>checkProductInventoryDiscontinuation [org/ofbiz/
>>product/inventory/InventoryServices.xml/checkProductInventoryDiscontinuation]
>>(simple)
>>23796 (main) [  ServiceDispatcher.java:537:INFO ]
>>[ServiceDispatcher.runAsync] : prevalidation  
>>checkProductInventoryDiscontinuation [org/of
>>biz/product/inventory/InventoryServices.xml/checkProductInventoryDiscontinuation]
>>(simple)
>>23797 (main) [  ServiceDispatcher.java:550:INFO ]
>>[ServiceDispatcher.runAsync] : running service    
>>checkProductInventoryDiscontinuation [org
>>/ofbiz/product/inventory/InventoryServices.xml/checkProductInventoryDiscontinuation]
>>(simple)
>>23805 (main) [ GenericAsyncEngine.java:152:INFO ] NO JobManager:
>>23806 (main) [ GenericAsyncEngine.java:154:INFO ] Attempting to run job :
>>23807 (main) [  ServiceDispatcher.java:570:DEBUG] [[ASync service
>>failed...- total:0.015,since last(ASync service sta...):0.015]] - 'entity-d
>>efault / checkProductInventoryDiscontinuation'
>>23815 (main) [  ServiceDispatcher.java:573:ERROR]
>>---- runtime exception report
>>--------------------------------------------------
>>Service [checkProductInventoryDiscontinuation] threw an unexpected
>>exception/error
>>Exception: java.lang.NullPointerException
>>Message: null
>>---- stack trace
>>---------------------------------------------------------------
>>java.lang.NullPointerException
>>org.ofbiz.service.engine.GenericAsyncEngine.runAsync(GenericAsyncEngine.java:155)
>>
>>
>>Thanx.
>>Fred
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users