Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18031

[7.x] NPEs logged when a field is empty/null in SAP Document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.11-GA
    • fuse-7.10-GA
    • Camel
    • False
    • False
    • % %
    • Todo
    • Hide

      (to be tested)
      /!\ it will hide other warn log that could be useful
      set log level to error for org.fusesource.camel.component.sap.util.IDocUtil

      Show
      (to be tested) /!\ it will hide other warn log that could be useful set log level to error for org.fusesource.camel.component.sap.util.IDocUtil
    • Hide

      wasn't able to check but it should be possible by using non-string types, such as date or BigInteger and left them empty/null and try to "send the document"

      Show
      wasn't able to check but it should be possible by using non-string types, such as date or BigInteger and left them empty/null and try to "send the document"

    Description

      it can potentially spam logs.

       2021-12-16 13:59:10,990 | WARN  | qtp170919297-73  |
      IDocUtil                         | 753 - org.fusesource.camel-sap -
      6.3.0.redhat-416 | Failed to set value on field 'QUANTITY' in segment
      'ACC_DOCUMENT:ACC_DOCUMENT03---:XX_AVALUE_XXXXXX'
      java.lang.NullPointerException
           at
      org.fusesource.camel.component.sap.util.IDocUtil.setIdocFieldValue(IDocUtil.java:1442)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
           at
      org.fusesource.camel.component.sap.util.IDocUtil.fillIDocSegmentFromSegment(IDocUtil.java:642)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
           at
      org.fusesource.camel.component.sap.util.IDocUtil.fillIDocSegmentFromSegment(IDocUtil.java:654)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
           at
      org.fusesource.camel.component.sap.util.IDocUtil.fillIDocDocumentFromDocument(IDocUtil.java:618)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
           at
      org.fusesource.camel.component.sap.util.IDocUtil.sendDocument(IDocUtil.java:316)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
           at
      org.fusesource.camel.component.sap.SapTransactionalIDocProducer.process(SapTransactionalIDocProducer.java:68)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
           at
      org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[232:org.apache.camel.camel-core:2.17.0.redhat-630416]
           at
      org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)[232:org.apache.camel.camel-core:2.17.0.redhat-630416]
           at
      org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[232:org.apache.camel.camel-core:2.17.0.redhat-630416]
           at
      org.fusesource.camel.component.sap.CurrentProcessorDefinitionInterceptStrategy$1.process(CurrentProcessorDefinitionInterceptStrategy.java:31)[753:org.fusesource.camel-sap:6.3.0.redhat-416]
      

      org.fusesource.camel-sap:6.3.0.redhat-416 means that it is the 6.3.0 R13 based on this document.
      It corresponds to this line:

      String bigDecString = ((BigDecimal) segment.get(fieldName)).toString();
      

      it happens for several different fields, slightly different line as they are dates for VATDATE, INVOICE_REC_DATE.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              apupier@redhat.com Aurélien Pupier
              Tomas Veskrna Tomas Veskrna
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: