Bug 1011865

Summary: TypeProcessor executes evaluation even if the required header is not present
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: RT GovernanceAssignee: Gary Brown <gbrown>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Pechanec <jpechane>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: soa-p-jira
Target Milestone: ER7   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: --- Target Upstream Version:

Description Jiri Pechanec 2013-09-25 09:27:52 UTC
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 10:57:39 UTC
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 11:27:06 UTC
Gary Brown <gary> updated the status of jira RTGOV-305 to Resolved

Comment 3 Jiri Pechanec 2013-12-18 10:36:49 UTC
Verified in ER7

Comment 4 JBoss JIRA Server 2014-07-02 09:18:38 UTC
Gary Brown <gary> updated the status of jira RTGOV-305 to Closed