Return-Path: X-Original-To: apmail-ode-dev-archive@www.apache.org Delivered-To: apmail-ode-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 264599B9B for ; Mon, 16 Apr 2012 15:06:45 +0000 (UTC) Received: (qmail 38616 invoked by uid 500); 16 Apr 2012 15:06:45 -0000 Delivered-To: apmail-ode-dev-archive@ode.apache.org Received: (qmail 38589 invoked by uid 500); 16 Apr 2012 15:06:45 -0000 Mailing-List: contact dev-help@ode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ode.apache.org Delivered-To: mailing list dev@ode.apache.org Received: (qmail 38577 invoked by uid 99); 16 Apr 2012 15:06:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2012 15:06:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2012 15:06:40 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D9ACE3538E1 for ; Mon, 16 Apr 2012 15:06:18 +0000 (UTC) Date: Mon, 16 Apr 2012 15:06:18 +0000 (UTC) From: "Jayant Vaish (Updated) (JIRA)" To: dev@ode.apache.org Message-ID: <1192212769.28742.1334588778897.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (ODE-840) XPath20ExpressionCompilerImpl can't parse functions with embedded functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ODE-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jayant Vaish updated ODE-840: ----------------------------- Attachment: ODE-840.patch > 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 > > Attachments: ODE-840.patch, ODE-840.patch, ode-840-v1.txt, ode-bpel-compiler-1.3.x-SNAPSHOT.jar > > > 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 "" > What is more the application doesn't show a stractrace: > 2010-06-04 11:06:10,254 [Timer-1] DEBUG org.apache.ode.bpel.elang.xpath20.compiler.XPath20ExpressionCompilerBPEL20 - javax.xml.xpath.XPathExpressionException > because the exception is logged this way: > __log.debug(e); > but it should be > __log.debug("some message", e); > The exception: > 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 "" > 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. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira