[ 
https://issues.apache.org/jira/browse/ODE-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856037#action_12856037
 ] 

Tammo van Lessen commented on ODE-648:
--------------------------------------

The compiler consists of two parts. The parser and the compiler. The parser 
parses a BPEL file into the BOM (BPEL Object Model) which is mostly independent 
of the underlying BPEL version. It basically provides a convenient interface 
over the DOM tree and aims at abstracting from the differences between both 
versions. Then the compiler works on this BOM and translates it into the 
OModel, which performs some deeper consistency checks and some optimizations.

In the case described this issue, the parser reads the from-spec as a BPEL 2.0 
element, thus the expression-attribute is null. Now the compiler takes the BOM, 
sees that the expression is null and correctly complains that there is no 
expression set. Now the developer looks into the file and thinks: hey, why is 
it complaining, see, here is my expression attribute. So the aim of this issue 
is to catch this special user mistake (as it happens more often than expected) 
and throw a more meaningful exception, pointing out that your process 
definition is in BPEL 2.0, but you were using a BPEL 1.1 from spec and thus the 
expression appears to be null although it is in the (not read) attribute. It's 
just about user convenience. Not a bug in the compiler.

> Compiler should throw a meaningful error if <from>/<to> expression is empty
> ---------------------------------------------------------------------------
>
>                 Key: ODE-648
>                 URL: https://issues.apache.org/jira/browse/ODE-648
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Compilation/Parsing
>    Affects Versions: 1.2, 1.3.2, 1.3.3, 2.0
>            Reporter: Tammo van Lessen
>            Assignee: Tammo van Lessen
>             Fix For: 1.3.5
>
>
> If the expression is empty, the only error message is from the expression 
> compiler and is quite confusing:
> java.lang.IllegalStateException: XPath string and xpath node are both null
>     at 
> org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerImpl.doJaxpCompile.
> Fixing this issue will also help if a copy and paste engineer added a BPEL 
> 1.1 <from expression="someexp"/> to a BPEL 2.0 process ;)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to