1 Reply Latest reply on Aug 17, 2014 5:46 AM by 1128724

    InstanceMessageUtil date format

    1128724

      Dear B2B experts,

       

      I am using Fusion Middleware 11.1.1.7.

       

      I am trying to use InstanceMessageUtil to retrieve instance messages from B2B instance message store. I followed the documentation to invoke this method as follows:

       

      InstanceMessageUtil util = new InstanceMessageUtil();

        InstanceMessage[] messages = util.getInstanceMessages("10/10/2013", "10/28/2014", "MyPartner");

       

      However, I received the following error:

       

      java.lang.StringIndexOutOfBoundsException: String index out of range: -1

              at java.lang.String.substring(String.java:1937)

              at java.lang.String.substring(String.java:1904)

              at oracle.tip.b2b.utility.InstanceMessageUtil.formatDate(InstanceMessageUtil.java:398)

              at oracle.tip.b2b.utility.InstanceMessageUtil.getInstanceMessagesForDateRange(InstanceMessageUtil.java:135)

              ... ...

      Is the exception caused by the date format?

       

      The documentation does not say the correct date format the method is expecting. The sample provided in JavaDoc is not clearly either (I can figure out it uses the MM/DD/YYYY format. In fact, if I want to specify a date time, will the API work?

       

      Your help is much appreciated.

       

      LXZ