Bug 1011865 - TypeProcessor executes evaluation even if the required header is not present
TypeProcessor executes evaluation even if the required header is not present
Status: CLOSED CURRENTRELEASE
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: RT Governance (Show other bugs)
6.0.0 GA
Unspecified Unspecified
unspecified Severity medium
: ER7
: 6.0.0
Assigned To: Gary Brown
Jiri Pechanec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-25 05:27 EDT by Jiri Pechanec
Modified: 2014-07-02 05:18 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker RTGOV-305 Major Closed Missing header still results in IP attempting to evaluate expression 2014-07-02 05:18:38 EDT

  None (edit)
Description Jiri Pechanec 2013-09-25 05:27:52 EDT
TypeProcessor - line 453 and others

When an expression has to be execute on a header there is a check to verify the header is present.
If not a WARN is logged but an expression is still evaluated, which can lead to exceptions in the script.

Also if exception is thrown inside MVEL scirpt the exception is logged only at debug level, event is not recored and it is difficult to identify what happened.
Comment 1 Gary Brown 2013-10-23 06:57:39 EDT
Re: the last para of the description, wasn't able to reproduce this - if the header was missing, I got:

11:56:19,420 WARNING [org.overlord.rtgov.activity.processor.TypeProcessor] (http-/127.0.0.1:8080-1) Property evaluator 'contentType' failed to find a header: org.switchyard.contentTypeXX
11:56:19,422 SEVERE [org.overlord.rtgov.internal.switchyard.camel.AbstractExchangeEventProcessor] (http-/127.0.0.1:8080-1) Failed to report activity event: [Error: null pointer or function not found: toString]
[Near : {... toString() ....}]
             ^
[Line: 1, Column: 1]
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:1015) [mvel2-2.1.6.Final.jar:]
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:980) [mvel2-2.1.6.Final.jar:]
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:340) [mvel2-2.1.6.Final.jar:]
Comment 2 JBoss JIRA Server 2013-10-23 07:27:06 EDT
Gary Brown <gary@brownuk.com> updated the status of jira RTGOV-305 to Resolved
Comment 3 Jiri Pechanec 2013-12-18 05:36:49 EST
Verified in ER7
Comment 4 JBoss JIRA Server 2014-07-02 05:18:38 EDT
Gary Brown <gary@brownuk.com> updated the status of jira RTGOV-305 to Closed

Note You need to log in before you can comment on or make changes to this bug.