2 Replies Latest reply: Nov 21, 2012 1:31 PM by GregTruta RSS

    xdoxslt:sum code not working in RTF template: Method not found 'sum'

    GregTruta
      We are getting the below error when running a custom RTF template using the application (Oracle HRMS) and within Desktop BiPublisher for one particular set of data (1 employees check data). The RTF format template code that seems to be the cause of the error is the running total code that is supposed to sum YTD_HOURS for any elements within the AC_EARNINGS xml data set:

      Problematic code: <?xdoxslt:sum(YTD_HOURS [.!=''])?>

      From the error message below it seems to be having trouble with the sum

      Error from Oracle HRMS concurrent manager:

      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
      )
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
      .java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:677)
           at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:425)
           at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:244)
           at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
           at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
           at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
           at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
           at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
           at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
           at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateH
      elper.java:5936)
           at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelp
      er.java:3459)
           at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelp
      er.java:3548)
           at oracle.apps.pay.core.documents.DocGenerator.process(DocGenerator.java:521)
      Caused by: oracle.xdo.parser.v2.XPathException: Extension function error: Method
      not found 'sum'     at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1534)
           at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:521)
           at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
           at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
           at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
           at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
           ... 17 more

      HR_6882_HRPROC_ASSERT
      LOCATION pyjavacom:2
      APP-PAY-06882: Assertion failure detected at location pyjavacom:2.

      Cause: an internal error has occurred at location pyjavacom:2.

      Action: please contact your Oracle customer representative.



      Note: The RTF check template works ok most of the time, but there is an issue with the XML data template below. In this scenario there is no YTD_HOURS and only one row of data for this employee, unlike the second example data from another check below.

      Data that the code is NOT working with:

      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>58423</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10511197</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>1200</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>1584.8</CURRENT_AMOUNT>
      <YTD_AMOUNT>25698.88</YTD_AMOUNT>
      <REPORTING_NAME>Regular Pay</REPORTING_NAME>
      <CURRENT_HOURS>80</CURRENT_HOURS>
      <YTD_HOURS>1312</YTD_HOURS>
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL>19.81</RATE_MUL>
      <RATE_RET />
      </AC_EARNINGS>

      Data that the code IS working with:

      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>58423</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10511197</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>1200</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>1584.8</CURRENT_AMOUNT>
      <YTD_AMOUNT>25698.88</YTD_AMOUNT>
      <REPORTING_NAME>Regular Pay</REPORTING_NAME>
      <CURRENT_HOURS>80</CURRENT_HOURS>
      <YTD_HOURS>1312</YTD_HOURS>
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL>19.81</RATE_MUL>
      <RATE_RET />
      </AC_EARNINGS>
      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Imputed Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>58444</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10511222</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>3250</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>1.46</CURRENT_AMOUNT>
      <YTD_AMOUNT>25.51</YTD_AMOUNT>
      <REPORTING_NAME>Group Term Life</REPORTING_NAME>
      <CURRENT_HOURS />
      <YTD_HOURS />
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL />
      <RATE_RET />
      </AC_EARNINGS>
      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Supplemental Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>58431</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10511205</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>2500</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>9.6</CURRENT_AMOUNT>
      <YTD_AMOUNT>163.2</YTD_AMOUNT>
      <REPORTING_NAME>Dental CB</REPORTING_NAME>
      <CURRENT_HOURS>0</CURRENT_HOURS>
      <YTD_HOURS>0</YTD_HOURS>
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL />
      <RATE_RET />
      </AC_EARNINGS>
      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>64614</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10518109</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>1526</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>0</CURRENT_AMOUNT>
      <YTD_AMOUNT>1571.12</YTD_AMOUNT>
      <REPORTING_NAME>TOWP</REPORTING_NAME>
      <CURRENT_HOURS />
      <YTD_HOURS>80</YTD_HOURS>
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL />
      <RATE_RET />
      </AC_EARNINGS>
      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>57863</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10510820</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>1200</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>0</CURRENT_AMOUNT>
      <YTD_AMOUNT>937.2</YTD_AMOUNT>
      <REPORTING_NAME>Holiday</REPORTING_NAME>
      <CURRENT_HOURS />
      <YTD_HOURS>48</YTD_HOURS>
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL />
      <RATE_RET />
      </AC_EARNINGS>
      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Imputed Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>63592</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10517244</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>3250</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>0</CURRENT_AMOUNT>
      <YTD_AMOUNT>285.07</YTD_AMOUNT>
      <REPORTING_NAME>F90 SVEU DIST</REPORTING_NAME>
      <CURRENT_HOURS />
      <YTD_HOURS />
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL />
      <RATE_RET />
      </AC_EARNINGS>
      - <AC_EARNINGS>
      <DATE_DISP_FLG>N</DATE_DISP_FLG>
      <ELEMENT_CLASSIFICATION>Supplemental Earnings</ELEMENT_CLASSIFICATION>
      <ELEMENT_TYPE_ID>67074</ELEMENT_TYPE_ID>
      <PRIMARY_BALANCE>10520289</PRIMARY_BALANCE>
      <PROCESSING_PRIORITY>2500</PROCESSING_PRIORITY>
      <CURRENT_AMOUNT>0</CURRENT_AMOUNT>
      <YTD_AMOUNT>85.24</YTD_AMOUNT>
      <REPORTING_NAME>Other Tx Rcv</REPORTING_NAME>
      <CURRENT_HOURS />
      <YTD_HOURS />
      <RATE />
      <CURRENT_DAYS />
      <YTD_DAYS />
      <ATTRIBUTE_NAME />
      <ORIGINAL_DATE_EARNED />
      <EFFECTIVE_START_DATE />
      <EFFECTIVE_END_DATE />
      <ELEMENT_CATEGORY />
      <JURISDICTION_CODE />
      <RATE_MUL />
      <RATE_RET />
      </AC_EARNINGS>


      If anyone has any ideas as to what is needed to resolve the issue we are having at our company can you please let me know? I appreciate your time. If you need any more information please let me know and I will post it.

      Thank you,

      Greg

      Edited by: gtruta on Nov 20, 2012 4:20 PM

      Edited by: gtruta on Nov 20, 2012 4:21 PM
        • 1. Re: xdoxslt:sum code not working in RTF template: Method not found 'sum'
          Avinash_Varma
          <?xdoxslt:sum(YTD_HOURS [.!=''])?>

          we use xdoxslt sum to avoid the issue while sum fields having null . as u have already keeping the condition with the field u don't need xdoxslt

          <?sum(YTD_HOURS[.!=''])?> is enough try this

          are u able to preview the template with the sum code.

          send me your template and xml . i can try at my side
          email: datlaavinash@gmail.com
          • 2. Re: xdoxslt:sum code not working in RTF template: Method not found 'sum'
            GregTruta
            Thank you Avinash_Varma very much! This indeed did solve our issue in the customized RTF template for the Check Writer (XML) in Oracle HRMS. I installed this into the application and it works within Oracle 12.1.3 EBS with oracle seeded data template.

            I will need to read up more on when to use XSLT language versus uses oracle native function (without the XDOXSLT). I need to understand when it is best or appropriate to use one versus the other. I am just beginning to develop within Bi Bublisher formatting and data templates so I need to increase my knowledge in this area. If you are able to comment on this subject I would be interested as to what you had to say.

            Greg

            Edited by: GregTruta on Nov 21, 2012 12:31 PM