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 |
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 |
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 |
Actually this service is part of a recent ofbiz checkout. I am using batch ofbiz.jar -install -file=...... to load a bunch of InventoryItem records. It does not look like the service is getting executed since the service manager is failing to start it. or so it seems. yes this is a simple service. BJ Freeman wrote: 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 _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
changed from async to sync and now it works. <eca entity="InventoryItem" operation="create-store" event="return"> <condition field-name="productId" operator="is-not-empty"/> <condition field-name="availableToPromiseTotal" operator="is-not-empty"/> <condition field-name="availableToPromiseTotal" operator="less-equals" value="0" type="Double"/> <action service="checkProductInventoryDiscontinuation" mode="sync"/> </eca> Fred Forester wrote:
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
The latest svn still has this as an async method but it only works for me when it's mode is sync. is this a bug? Fred Forester wrote:
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |