Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6792

Exception when sending an order confirmation email

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Release Branch 14.12, Trunk
    • 14.12.01, 15.12.01
    • ecommerce, order
    • None
    • Eclipse IDE

    Description

      Receive the following exception while placing an order through the ecommerce application.....

      groovy.lang.MissingPropertyException: No such property: response for class: CompanyHeader

      Following is the relevant portion of the stack trace...

      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) ~[groovy-all-2.2.1.jar:2.2.1]
      at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) ~[groovy-all-2.2.1.jar:2.2.1]
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) ~[groovy-all-2.2.1.jar:2.2.1]
      at CompanyHeader.run(CompanyHeader.groovy:48) ~[?:?]

      ...

      Apparently, the response object is not available within the context when the sendOrderConfirmation service is run.

      Steps to reproduce the exception....

      1. Checkout OFBiz 14.12 Release (revision was 1722928 at the time of checkout).
      2. Run the default build.
      3. Load the demo data.
      4. Start the OFBiz instance (it will use the OOTB default derby db of course).
      5. Within a browser goto URL.. http://localhost:8080/ecommerce
      6. Proceed to place an order adding at least one item to the cart.
      7. While checking out you may or may not have to create an account. I created an account for this test.
      8. Proceed through all the checkout steps and submit the order.

      Monitor the log and you will see the exception occur within a few seconds. This exception doesn't occur in the OFBiz 13.07 release branch. In fact, the response object is not referenced at all in the CompanyHeader.groovy from the 13.07 branch. Whoever inserted the code that references the response object within the CompanyHeader.groovy script, must have neglected to test the changes with the ecommerce application. I only found the error while migrating our instance of OFBiz to the 14.12 release. Our custom ecommerce application employs the sendOrderConfirmation service the same way the OOTB ecommerce application does.

      I hope I have provided sufficient information for someone to resolve this issue. Thanks.

      Attachments

        1. OFBIZ-6792.patch
          2 kB
          Jacques Le Roux

        Issue Links

          Activity

            People

              jleroux Jacques Le Roux
              ericnk Eric Kingston
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: