commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@codehaus.org
Subject [jira] Commented: (JELLY-8) jexl parse error
Date Wed, 20 Aug 2003 13:14:02 GMT
The following comment has been added to this issue:

     Author: Mark Wilkinson
    Created: Wed, 20 Aug 2003 8:13 AM
       Body:
This bug in jexl has now been fixed, although I don't think a new release of the jexl jar
file has been made.
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=JELLY-8


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JELLY-8
    Summary: jexl parse error
       Type: Bug

     Status: Assigned
   Priority: Major

 Time Spent: Unknown
  Remaining: 0 minutes

    Project: jelly

   Assignee: james strachan
   Reporter: Jason Horman

    Created: Sat, 28 Sep 2002 3:10 AM
    Updated: Sat, 28 Sep 2002 3:10 AM
Environment: java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)


Description:
The following jelly script:

<jelly xmlns="jelly:core" xmlns:log="jelly:log" xmlns:bsh="jelly:beanshell">
    <set var="testStr" value="hello"/>
    <log:info>${testStr.charAt(-2)}</log:info>
</jelly>

Throws the exception below. Changing the number to positive fixes the error. I realize this
would cause an OOB but it is just to demonstrate that something seems to be wrong with the
parsing of the expression.

org.apache.commons.jexl.parser.ParseException: Encountered "( -" at line 1, column 15.
Was expecting one of:
    "||" ...
    "or" ...
    "&&" ...
    "and" ...
    "|" ...
    "^" ...
    "&" ...
    "==" ...
    "eq" ...
    "!=" ...
    "ne" ...
    "<" ...
    "lt" ...
    ">" ...
    "gt" ...
    "<=" ...
    "le" ...
    ">=" ...
    "ge" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "div" ...
    "%" ...
    "mod" ...
    ";" ...
    "[" ...
    "(" <INTEGER_LITERAL> ...
    "(" <FLOAT_LITERAL> ...
    "(" "true" ...
    "(" "false" ...
    "(" <STRING_LITERAL> ...
    "(" "null" ...
    "(" <IDENTIFIER> ...
    "(" "(" ...
    "(" "empty" ...
    "(" "size" ...
    "(" "~" ...
    "(" "!" ...
    "(" "not" ...
    "(" ")" ...
    "." ...
    "=" ...
    
	at org.apache.commons.jexl.parser.Parser.generateParseException(Parser.java:3193)
	at org.apache.commons.jexl.parser.Parser.jj_consume_token(Parser.java:3077)
	at org.apache.commons.jexl.parser.Parser.ExpressionExpression(Parser.java:1519)
	at org.apache.commons.jexl.parser.Parser.Statement(Parser.java:1492)
	at org.apache.commons.jexl.parser.Parser.JexlScript(Parser.java:58)
	at org.apache.commons.jexl.parser.Parser.parse(Parser.java:18)
	at org.apache.commons.jexl.ExpressionFactory.createNewExpression(ExpressionFactory.java:124)
	at org.apache.commons.jexl.ExpressionFactory.createExpression(ExpressionFactory.java:88)
	at org.apache.commons.jelly.expression.jexl.JexlExpressionFactory.createExpression(JexlExpressionFactory.java:102)
	at org.apache.commons.jelly.expression.CompositeExpression.parse(CompositeExpression.java:128)
	at org.apache.commons.jelly.parser.XMLParser.addTextScript(XMLParser.java:1069)
	at org.apache.commons.jelly.parser.XMLParser.endElement(XMLParser.java:681)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579)
	at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinder.java:897)
	at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:643)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1972)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
	at org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:296)
	at org.apache.commons.jelly.Jelly.compileScript(Jelly.java:165)
	at org.apache.commons.jelly.Jelly.main(Jelly.java:122)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at com.werken.forehead.Forehead.run(Forehead.java:543)
	at com.werken.forehead.Forehead.main(Forehead.java:573)
[ERROR] XMLParser - -Caught exception: org.apache.commons.jexl.parser.ParseException: Encountered
"( -" at line 1, column 15.
Was expecting one of:
    "||" ...
    "or" ...
    "&&" ...
    "and" ...
    "|" ...
    "^" ...
    "&" ...
    "==" ...
    "eq" ...
    "!=" ...
    "ne" ...
    "<" ...
    "lt" ...
    ">" ...
    "gt" ...
    "<=" ...
    "le" ...
    ">=" ...
    "ge" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "div" ...
    "%" ...
    "mod" ...
    ";" ...
    "[" ...
    "(" <INTEGER_LITERAL> ...
    "(" <FLOAT_LITERAL> ...
    "(" "true" ...
    "(" "false" ...
    "(" <STRING_LITERAL> ...
    "(" "null" ...
    "(" <IDENTIFIER> ...
    "(" "(" ...
    "(" "empty" ...
    "(" "size" ...
    "(" "~" ...
    "(" "!" ...
    "(" "not" ...
    "(" ")" ...
    "." ...
    "=" ...
     <org.apache.commons.jexl.parser.ParseException: Encountered "( -" at line 1, column
15.
Was expecting one of:
    "||" ...
    "or" ...
    "&&" ...
    "and" ...
    "|" ...
    "^" ...
    "&" ...
    "==" ...
    "eq" ...
    "!=" ...
    "ne" ...
    "<" ...
    "lt" ...
    ">" ...
    "gt" ...
    "<=" ...
    "le" ...
    ">=" ...
    "ge" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "div" ...
    "%" ...
    "mod" ...
    ";" ...
    "[" ...
    "(" <INTEGER_LITERAL> ...
    "(" <FLOAT_LITERAL> ...
    "(" "true" ...
    "(" "false" ...
    "(" <STRING_LITERAL> ...
    "(" "null" ...
    "(" <IDENTIFIER> ...
    "(" "(" ...
    "(" "empty" ...
    "(" "size" ...
    "(" "~" ...
    "(" "!" ...
    "(" "not" ...
    "(" ")" ...
    "." ...
    "=" ...
    >
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at com.werken.forehead.Forehead.run(Forehead.java:543)
	at com.werken.forehead.Forehead.main(Forehead.java:573)
Caused by: org.apache.commons.jexl.parser.ParseException: Encountered "( -" at line 1, column
15.
Was expecting one of:
    "||" ...
    "or" ...
    "&&" ...
    "and" ...
    "|" ...
    "^" ...
    "&" ...
    "==" ...
    "eq" ...
    "!=" ...
    "ne" ...
    "<" ...
    "lt" ...
    ">" ...
    "gt" ...
    "<=" ...
    "le" ...
    ">=" ...
    "ge" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "div" ...
    "%" ...
    "mod" ...
    ";" ...
    "[" ...
    "(" <INTEGER_LITERAL> ...
    "(" <FLOAT_LITERAL> ...
    "(" "true" ...
    "(" "false" ...
    "(" <STRING_LITERAL> ...
    "(" "null" ...
    "(" <IDENTIFIER> ...
    "(" "(" ...
    "(" "empty" ...
    "(" "size" ...
    "(" "~" ...
    "(" "!" ...
    "(" "not" ...
    "(" ")" ...
    "." ...
    "=" ...
    
	at org.apache.commons.jelly.parser.XMLParser.endElement(XMLParser.java:705)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579)
	at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinder.java:897)
	at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:643)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1972)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
	at org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:296)
	at org.apache.commons.jelly.Jelly.compileScript(Jelly.java:165)
	at org.apache.commons.jelly.Jelly.main(Jelly.java:122)
	... 6 more



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message