[ 
http://jira.undersunconsulting.com/browse/OFBIZ-672?page=comments#action_13786 ]
     
Marco Risaliti commented on OFBIZ-672:
--------------------------------------

Hi David,

I have looking into the source of InventoryService.java and I have seen that 
someone has already been fixed to avoid that the null pointer exception will 
occurr again.

Timestamp actualPromiseDate = currentPromiseDate;
                if (actualPromiseDate == null) {
                    if (promisedDate != null) {
                        actualPromiseDate = promisedDate;
                    } else {
                        // fall back if there is no promised date stored
                        actualPromiseDate = 
reservation.getTimestamp("reservedDatetime");
                    }
                }
                
                Debug.log("Promised Date: " + actualPromiseDate, module);

If you are agree with me someone can close this issue ?

Thanks
Marco

> actualPromiseDate is null in InventoryServices.java
> ---------------------------------------------------
>
>          Key: OFBIZ-672
>          URL: http://jira.undersunconsulting.com/browse/OFBIZ-672
>      Project: [OFBiz] Open For Business
>         Type: Bug
>   Components: product
>     Versions: SVN
>     Reporter: David N. Welton
>     Assignee: Jira Administrator
>     Priority: Minor

>
>
> This is the relevant bit of log file:
> I added the debug line that reports "actualPromiseDate is NULL, promisedDate 
> is null".
> Since this portion of code comes before the patch I did, I don't *think* 
> that's the cause of the problem...
> 12812868 (invoker-Thread-8) [  InventoryServices.java:335:INFO ] OOS 
> Inventory Items: 2
> 12812876 (invoker-Thread-8) [  InventoryServices.java:369:INFO ] Reservations 
> for item: 1
> 12812877 (invoker-Thread-8) [  InventoryServices.java:384:INFO ] 
> actualPromiseDate is NULL, promisedDate is null
> 12812877 (invoker-Thread-8) [  InventoryServices.java:388:INFO ] Promised 
> Date: null
> 12812878 (invoker-Thread-8) [  InventoryServices.java:403:INFO ] Next Ship 
> Date: null
> 12812879 (invoker-Thread-8) [  ServiceDispatcher.java:381:DEBUG] [[Sync 
> service failed...- total:0.0,since last(Begin):0.0]] - 'JobDispatcher / 
> checkInventoryAvailability'
> 12812880 (invoker-Thread-8) [  ServiceDispatcher.java:384:ERROR] 
> ---- exception report 
> ----------------------------------------------------------
> Service [checkInventoryAvailability] threw an unexpected exception/error
> Exception: org.ofbiz.service.GenericServiceException
> Message: Service target threw an unexpected exception (null)
> ---- stack trace 
> ---------------------------------------------------------------
> org.ofbiz.service.GenericServiceException: Service target threw an unexpected 
> exception (null)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:113)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:63)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:110)
> org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:80)
> org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:226)
> java.lang.Thread.run(Thread.java:534)
> java.lang.NullPointerException
> org.ofbiz.product.inventory.InventoryServices.checkInventoryAvailability(InventoryServices.java:406)
> Thanks,
> Dave

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.undersunconsulting.com/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to