Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3897

Handle ProcessException thrown by MVEL in getProperty

    XMLWordPrintable

    Details

      Description

      In JBpmObjectMapper, MVEL.getProperty is called to check the context - if the string we search for is not in the context, then a PropertyAccessException is thrown. Catch that exception and do nothing with it so that the warning at the end of JBPMObjectMapper.setOnEsbMessage can be logged.

      [junit] Testcase: testMissingObject took 0.138 sec
      [junit] Caused an ERROR
      [junit] failed to access property: v1: could not access property: v1
      [junit] [Error: failed to access property: v1: could not access property: v1]
      [junit] [Near :

      {... Unknown ....}]
      [junit] ^
      [junit] [Line: 1, Column: 0]
      [junit] at org.mvel2.PropertyAccessor.get(PropertyAccessor.java:235)
      [junit] at org.mvel2.PropertyAccessor.get(PropertyAccessor.java:128)
      [junit] at org.mvel2.MVEL.getProperty(MVEL.java:1179)
      [junit] at org.jboss.soa.esb.services.jbpm.JBpmObjectMapper.setOnEsbMessage(JBpmObjectMapper.java:140)
      [junit] at org.jboss.soa.esb.services.jbpm.JBpmObjectMapper.mapFromJBpmToEsbMessage(JBpmObjectMapper.java:81)
      [junit] at org.jboss.soa.esb.services.jbpm.JBpmObjectMapperUnitTest.testMissingObject(JBpmObjectMapperUnitTest.java:119)
      [junit] Caused by: [Error: could not access property: v1]
      [junit] [Near : {... Unknown ....}

      ]
      [junit] ^
      [junit] [Line: 1, Column: 0]
      [junit] at org.mvel2.PropertyAccessor.getBeanProperty(PropertyAccessor.java:616)
      [junit] at org.mvel2.PropertyAccessor.get(PropertyAccessor.java:158)
      [junit]

        Attachments

          Activity

            People

            Assignee:
            tcunning Thomas Cunningham
            Reporter:
            tcunning Thomas Cunningham
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: