ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mateusz Nowakowski (JIRA)" <j...@apache.org>
Subject [jira] Created: (ODE-840) XPath20ExpressionCompilerImpl can't parse functions with embedded functions
Date Fri, 04 Jun 2010 12:46:54 GMT
XPath20ExpressionCompilerImpl can't parse functions with embedded functions
---------------------------------------------------------------------------

                 Key: ODE-840
                 URL: https://issues.apache.org/jira/browse/ODE-840
             Project: ODE
          Issue Type: Bug
          Components: BPEL Compilation/Parsing
    Affects Versions: 1.3.4
         Environment: ODE 1.3.4 ReleaseCandidate
            Reporter: Mateusz Nowakowski
             Fix For: 1.3.4


org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerImpl.doJaxpCompile(OXPath20ExpressionBPEL20
out, Expression source):Line 169-170
            for (String functionExpr : extractFunctionExprs(xpathStr)) {
                expr = xpe.compile(functionExpr); //Line: 170 here an exception is thrown
            	try {
            		expr.evaluate(node);
            	} catch (XPathExpressionException xpee) {
                	// swallow errors caused by uninitialized variable 
            	}
            }

xpathStr equals: 
bpel:doXslTransform("1.0.1/some.xsl", $Variable.body, "someParameter", $OtherVariable.body,
"someParameter2", $SwsHeaderRQ, "someParameter3", true(), "someXpathParameter", $XPath)

The result of extractFunctionExprs(xpathStr) is a list with one element:

bpel:doXslTransform("1.0.1/some.xsl", $Variable.body, "someParameter", $OtherVariable.body,
"someParameter2", $SwsHeaderRQ, "someParameter3", true()

but it should be the same as xpathStr.


So the results is that Line 170 throws an exception:

Caused by: net.sf.saxon.trans.XPathException: XPath syntax error at char 149 in {...derRQ,
"someParameter3", tru...}:
    expected ")", found "<eof>"



javax.xml.xpath.XPathExpressionException
        at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:403)
        at org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerImpl.doJaxpCompile(XPath20ExpressionCompilerImpl.java:170)
        at org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerImpl._compile(XPath20ExpressionCompilerImpl.java:124)
        at org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerImpl.compile(XPath20ExpressionCompilerImpl.java:106)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileExpr(BpelCompiler.java:574)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileExpr(BpelCompiler.java:554)
        at org.apache.ode.bpel.compiler.AssignGenerator.compileFrom(AssignGenerator.java:194)
        at org.apache.ode.bpel.compiler.AssignGenerator.compile(AssignGenerator.java:82)
        at org.apache.ode.bpel.compiler.BpelCompiler$7.run(BpelCompiler.java:961)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileActivity(BpelCompiler.java:957)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:906)
        at org.apache.ode.bpel.compiler.SequenceGenerator.compileChildren(SequenceGenerator.java:54)
        at org.apache.ode.bpel.compiler.SequenceGenerator.compile(SequenceGenerator.java:45)
        at org.apache.ode.bpel.compiler.BpelCompiler$7.run(BpelCompiler.java:961)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileActivity(BpelCompiler.java:957)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:906)
        at org.apache.ode.bpel.compiler.IfGenerator.compile(IfGenerator.java:52)
        at org.apache.ode.bpel.compiler.BpelCompiler$7.run(BpelCompiler.java:961)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileActivity(BpelCompiler.java:957)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:906)
        at org.apache.ode.bpel.compiler.SequenceGenerator.compileChildren(SequenceGenerator.java:54)
        at org.apache.ode.bpel.compiler.SequenceGenerator.compile(SequenceGenerator.java:45)
        at org.apache.ode.bpel.compiler.BpelCompiler$7.run(BpelCompiler.java:961)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileActivity(BpelCompiler.java:957)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:906)
        at org.apache.ode.bpel.compiler.BpelCompiler$6.run(BpelCompiler.java:941)
        at org.apache.ode.bpel.compiler.BpelCompiler$8.run(BpelCompiler.java:1217)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileScope(BpelCompiler.java:1167)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileSLC(BpelCompiler.java:930)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:906)
        at org.apache.ode.bpel.compiler.SequenceGenerator.compileChildren(SequenceGenerator.java:54)
        at org.apache.ode.bpel.compiler.SequenceGenerator.compile(SequenceGenerator.java:45)
        at org.apache.ode.bpel.compiler.BpelCompiler$7.run(BpelCompiler.java:961)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileActivity(BpelCompiler.java:957)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:906)
        at org.apache.ode.bpel.compiler.BpelCompiler$5.run(BpelCompiler.java:760)
        at org.apache.ode.bpel.compiler.BpelCompiler$8.run(BpelCompiler.java:1217)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:1127)
        at org.apache.ode.bpel.compiler.BpelCompiler.compileScope(BpelCompiler.java:1167)
        at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:740)
        at org.apache.ode.bpel.compiler.BpelC.compile(BpelC.java:263)
        at org.apache.ode.bpel.compiler.BpelC.compile(BpelC.java:333)
        at org.apache.ode.store.DeploymentUnitDir$5.run(DeploymentUnitDir.java:213)
        at org.apache.ode.utils.InternPool.runBlock(InternPool.java:57)
        at org.apache.ode.store.DeploymentUnitDir.compile(DeploymentUnitDir.java:210)
        at org.apache.ode.store.DeploymentUnitDir.compile(DeploymentUnitDir.java:171)
        at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:200)
        at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:164)
        at org.apache.ode.jbi.OdeServiceUnit.deploy(OdeServiceUnit.java:74)
        at org.apache.ode.jbi.OdeSUManager.deploy(OdeSUManager.java:59)
        at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:520)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:349)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: net.sf.saxon.trans.XPathException: XPath syntax error at char 149 in {...derRQ,
"someParameter3", tru...}:
    expected ")", found "<eof>"
        at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:149)
        at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:125)
        at net.sf.saxon.expr.ExpressionParser.expect(ExpressionParser.java:113)
        at net.sf.saxon.expr.ExpressionParser.parseFunctionCall(ExpressionParser.java:1787)
        at net.sf.saxon.expr.ExpressionParser.parseBasicStep(ExpressionParser.java:1307)
        at net.sf.saxon.expr.ExpressionParser.parseStepExpression(ExpressionParser.java:1213)
        at net.sf.saxon.expr.ExpressionParser.parseRelativePath(ExpressionParser.java:1151)
        at net.sf.saxon.expr.ExpressionParser.parsePathExpression(ExpressionParser.java:1137)
        at net.sf.saxon.expr.ExpressionParser.parseUnaryExpression(ExpressionParser.java:1026)
        at net.sf.saxon.expr.ExpressionParser.parseCastExpression(ExpressionParser.java:691)
        at net.sf.saxon.expr.ExpressionParser.parseCastableExpression(ExpressionParser.java:646)
        at net.sf.saxon.expr.ExpressionParser.parseTreatExpression(ExpressionParser.java:627)
        at net.sf.saxon.expr.ExpressionParser.parseInstanceOfExpression(ExpressionParser.java:609)
        at net.sf.saxon.expr.ExpressionParser.parseIntersectExpression(ExpressionParser.java:1059)
        at net.sf.saxon.expr.ExpressionParser.parseUnionExpression(ExpressionParser.java:1041)
        at net.sf.saxon.expr.ExpressionParser.parseMultiplicativeExpression(ExpressionParser.java:978)
        at net.sf.saxon.expr.ExpressionParser.parseAdditiveExpression(ExpressionParser.java:958)
        at net.sf.saxon.expr.ExpressionParser.parseRangeExpression(ExpressionParser.java:876)
        at net.sf.saxon.expr.ExpressionParser.parseComparisonExpression(ExpressionParser.java:826)
        at net.sf.saxon.expr.ExpressionParser.parseAndExpression(ExpressionParser.java:423)
        at net.sf.saxon.expr.ExpressionParser.parseOrExpression(ExpressionParser.java:405)
        at net.sf.saxon.expr.ExpressionParser.parseExprSingle(ExpressionParser.java:354)
        at net.sf.saxon.expr.ExpressionParser.parseExpression(ExpressionParser.java:306)
        at net.sf.saxon.expr.ExpressionParser.parse(ExpressionParser.java:228)
        at net.sf.saxon.expr.ExpressionTool.make(ExpressionTool.java:73)
        at net.sf.saxon.xpath.XPathEvaluator.createExpressionInternal(XPathEvaluator.java:222)
        at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:401)
        ... 63 more

The whole log:

2010-06-04 11:06:10,051 [Timer-1] DEBUG org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerBPEL20
- Compiling expression bpel:doXslTransform("1.0.1/some.xsl", $Variable.body, "someParameter",
$OtherVariable.body, "someParameter2", $SwsHeaderRQ, "someParameter3", true(), "someXpathParameter",
$XPath)
2010-06-04 11:06:10,067 [Timer-1] DEBUG org.apache.ode.bpel.compiler.DefaultResourceFinder
- openResource: uri=1.0.1/some.xsl relativeDir=C:\pathToFuse-3.4.0.5\data\smx\service-assemblies\some-process-sa\version_1\sus\OdeBpelEngine\some-process-ode-su
absoluteDir=C:\pathToFuse-3.4.0.5\data\smx\service-assemblies\some-process-sa\version_1\sus\OdeBpelEngine\some-process-ode-su
2010-06-04 11:06:10,114 [Timer-1] DEBUG org.apache.ode.bpel.compiler.DefaultResourceFinder
- openResource: uri=SwsHeaderPopuler.xsl relativeDir=C:\pathToFuse-3.4.0.5\data\smx\service-assemblies\some-process-sa\version_1\sus\OdeBpelEngine\some-process-ode-su
absoluteDir=C:\pathToFuse-3.4.0.5\data\smx\service-assemblies\some-process-sa\version_1\sus\OdeBpelEngine\some-process-ode-su
2010-06-04 11:06:10,254 [Timer-1] DEBUG org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerBPEL20
- javax.xml.xpath.XPathExpressionException
2010-06-04 11:06:10,254 [Timer-1] INFO  org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerBPEL20
- Couldn't validate properly expression bpel:doXslTransform("1.0.1/some.xsl", $Variable.body,
"someParameter", $OtherVariable.body, "someParameter2", $SwsHeaderRQ, "someParameter3", true(),
"someXpathParameter", $XPath)
2010-06-04 11:06:10,254 [Timer-1] DEBUG org.apache.ode.bpel.compiler.AssignGenerator - verifying
copy: {OCopy {VarRef {Variable __PROCESS_SCOPE:ProcessNameProcess1.0.1.ProcessNameResponse:OMessageVarType#10({https://someNamespace.com/some}ProcessNameOutput)}.body}={OXPath10Expression
bpel:doXslTransform("1.0.1/some.xsl", $Variable.body, "someParameter", $OtherVariable.body,
"someParameter2", $SwsHeaderRQ, "someParameter3", true(), "someXpathParameter", $XPath)}}
2010-06-04 11:06:10,254 [Timer-1] DEBUG org.apache.ode.bpel.compiler.AssignGenerator - Copy
verified OK: {OCopy {VarRef {Variable __PROCESS_SCOPE:ProcessNameProcess1.0.1.ProcessNameResponse:OMessageVarType#10({https://someNamespace.com/some}ProcessNameOutput)}.body}={OXPath10Expression
bpel:doXslTransform("1.0.1/some.xsl", $Variable.body, "someParameter", $OtherVariable.body,
"someParameter2", $SwsHeaderRQ, "someParameter3", true(), "someXpathParameter", $XPath)}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message