Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • 17.12.06, 18.12.01
    • manufacturing
    • None

    Description

      I tried running MRP for Sales Forecast option and it returned the following error.

      Error running the initMrpEvents service: Service [initMrpEvents] target threw an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)

       

      Attachments

        1. OFBIZ-12187.patch
          1 kB
          Nameet Jain

        Activity

          Commit 1cf9d9110b007df20c77b38dfbff2d9ee0cc1aff in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=1cf9d91 ]

          Fixed: Error while running MRP (OFBIZ-12187)

          I tried running MRP for Sales Forecast option and it returned the following error.

          Error running the initMrpEvents service: Service [initMrpEvents] target threw
          an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)

          Thanks: Nameet Jain

          Conflict handled by hand

          jira-bot ASF subversion and git services added a comment - Commit 1cf9d9110b007df20c77b38dfbff2d9ee0cc1aff in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=1cf9d91 ] Fixed: Error while running MRP ( OFBIZ-12187 ) I tried running MRP for Sales Forecast option and it returned the following error. Error running the initMrpEvents service: Service [initMrpEvents] target threw an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date) Thanks: Nameet Jain Conflict handled by hand

          Commit 8a287a306a933e00085f983b6248f7a670c2afac in ofbiz-framework's branch refs/heads/release18.12 from Jacques Le Roux
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=8a287a3 ]

          Fixed: Error while running MRP (OFBIZ-12187)

          I tried running MRP for Sales Forecast option and it returned the following error.

          Error running the initMrpEvents service: Service [initMrpEvents] target threw
          an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)

          Thanks: Nameet Jain

          Conflict handled by hand

          jira-bot ASF subversion and git services added a comment - Commit 8a287a306a933e00085f983b6248f7a670c2afac in ofbiz-framework's branch refs/heads/release18.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=8a287a3 ] Fixed: Error while running MRP ( OFBIZ-12187 ) I tried running MRP for Sales Forecast option and it returned the following error. Error running the initMrpEvents service: Service [initMrpEvents] target threw an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date) Thanks: Nameet Jain Conflict handled by hand

          Commit 07054fdaf51fbabbf6e2003c5d0d44019669c7b8 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=07054fd ]

          Fixed: Error while running MRP (OFBIZ-12187)

          I tried running MRP for Sales Forecast option and it returned the following error.

          Error running the initMrpEvents service: Service [initMrpEvents] target threw
          an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)

          Thanks: Nameet Jain

          jira-bot ASF subversion and git services added a comment - Commit 07054fdaf51fbabbf6e2003c5d0d44019669c7b8 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=07054fd ] Fixed: Error while running MRP ( OFBIZ-12187 ) I tried running MRP for Sales Forecast option and it returned the following error. Error running the initMrpEvents service: Service [initMrpEvents] target threw an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date) Thanks: Nameet Jain

          I did not test, but clearly eventDate must be Timestamp

          jleroux Jacques Le Roux added a comment - I did not test, but clearly eventDate must be Timestamp
          nj Nameet Jain added a comment -

          Thanks jleroux

          nj Nameet Jain added a comment - Thanks jleroux

          I noticed something that could be related to OFBIZ-12187. that has no impact on the MRP run but is not totally clean.

          Normally when a PersistedServiceJob is run you get something like

          2024-07-22 19:02:52,378 |OFBiz-JobQueue-1     |PersistedServiceJob           |I| Job  [Send Email] Id [16405] 
          -- Next runtime: Mon Jul 22 19:17:52 CEST 2024
          2024-07-22 19:02:52,378 |OFBiz-JobQueue-0     |PersistedServiceJob           |I| Job  [Send Email] Id [16404] 
          -- Next runtime: Mon Jul 22 19:17:52 CEST 2024
          

          So you have somethink like this:

          Next runtime: Mon Jul 22 19:17:52 CEST 2024

          But when you run a MPR you get:

          2024-07-22 19:11:50,312 |jsse-nio-8443-exec-3 |ControlServlet                |T| 
          [[[runMrpGo(Domain:https://localhost)] Request Done- total:0.398,since last([runMrpGo(Domain:...):0.398]]
          2024-07-22 19:11:52,481 |OFBiz-JobQueue-0     |PersistedServiceJob           |I| Job  [1721668310012] Id [16532] 
          -- Next runtime: Thu Jan 01 00:59:59 CET 1970
          2024-07-22 19:11:52,514 |OFBiz-JobQueue-0     |MrpServices                   |I| executeMrp called
          

          Note the

          – Next runtime: Thu Jan 01 00:59:59 CET 1970

          It has no impact on the MRP run beause there is no next job run. It's an only one job run. But that's a wrong information in log.

          I'll see if we can make a workaround that by checking if we have a "Sales Forecast option", not a big deal anyway.

          jleroux Jacques Le Roux added a comment - I noticed something that could be related to OFBIZ-12187 . that has no impact on the MRP run but is not totally clean. Normally when a PersistedServiceJob is run you get something like 2024-07-22 19:02:52,378 |OFBiz-JobQueue-1 |PersistedServiceJob |I| Job [Send Email] Id [16405] -- Next runtime: Mon Jul 22 19:17:52 CEST 2024 2024-07-22 19:02:52,378 |OFBiz-JobQueue-0 |PersistedServiceJob |I| Job [Send Email] Id [16404] -- Next runtime: Mon Jul 22 19:17:52 CEST 2024 So you have somethink like this: Next runtime: Mon Jul 22 19:17:52 CEST 2024 But when you run a MPR you get: 2024-07-22 19:11:50,312 |jsse-nio-8443-exec-3 |ControlServlet |T| [[[runMrpGo(Domain:https://localhost)] Request Done- total:0.398,since last([runMrpGo(Domain:...):0.398]] 2024-07-22 19:11:52,481 |OFBiz-JobQueue-0 |PersistedServiceJob |I| Job [1721668310012] Id [16532] -- Next runtime: Thu Jan 01 00:59:59 CET 1970 2024-07-22 19:11:52,514 |OFBiz-JobQueue-0 |MrpServices |I| executeMrp called Note the – Next runtime: Thu Jan 01 00:59:59 CET 1970 It has no impact on the MRP run beause there is no next job run. It's an only one job run. But that's a wrong information in log. I'll see if we can make a workaround that by checking if we have a "Sales Forecast option", not a big deal anyway.

          Just had a look to the patch, it should not related to this issue. Then, it must be all times.

          jleroux Jacques Le Roux added a comment - Just had a look to the patch, it should not related to this issue. Then, it must be all times.

          People

            jleroux Jacques Le Roux
            nj Nameet Jain
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: