You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Byron Foster (JIRA)" <de...@velocity.apache.org> on 2008/10/01 10:47:44 UTC

[jira] Created: (VELOCITY-620) Parse error creates an obscure error message

Parse error creates an obscure error message
--------------------------------------------

                 Key: VELOCITY-620
                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.6
            Reporter: Byron Foster


The following incorrect velocity usage:

#macro(foo $a)
  blaa
#end
#foo("b" "c")

or ...

#if ($x = "a")
#end

will create the obscure error message in the exception:

> Bad Reference "null" in /foo.vm:18




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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Resolved: (VELOCITY-620) Parse error creates an obscure error message

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELOCITY-620.
-----------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: 1.6

> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELOCITY-620:
----------------------------------

    Attachment:     (was: Velocity620TestCase.java)

> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELOCITY-620:
----------------------------------

    Attachment: Velocity620TestCase.java

> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELOCITY-620:
----------------------------------

    Attachment:     (was: Velocity620TestCase.java)

> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELOCITY-620:
----------------------------------

    Attachment: Velocity620TestCase.java

latest version of the test...

> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by Nathan Bubna <nb...@gmail.com>.
On Thu, Oct 2, 2008 at 3:32 AM, Byron Foster <by...@base2.cc> wrote:
> I need a sanity check.  I tested this with an unmodified checkout from svn:
>
> URL: http://svn.apache.org/repos/asf/velocity/engine/trunk
> Last Changed Author: nbubna
> Last Changed Rev: 700847
> Last Changed Date: 2008-10-01 10:39:45 -0700 (Wed, 01 Oct 2008)
>
> This is the latest as of now on trunk.  I tested the below case with no
> velocity properties set (running with defaults), and I still get my original
> reported results (Bad Reference "null").  In fact, I tracked down the
> problem (An exception was getting dropped).   So I'm wondering if we are
> looking at the same source base, or maybe there is still some condition in
> my environment that is not in yours.  Can you verify that you are using the
> same source snapshot as myself?

C:\java\apache\velocity\head\build>svn info ..
Path: ..
URL: https://svn.apache.org/repos/asf/velocity/engine/trunk
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 701169
Node Kind: directory
Schedule: normal
Last Changed Author: nbubna
Last Changed Rev: 700847
Last Changed Date: 2008-10-01 10:39:45 -0700 (Wed, 01 Oct 2008)


C:\java\apache\velocity\head\build>svn status ..
?      ../src/test/org/apache/velocity/test/issues/Velocity620TestCase.java
M      ../src/changes/changes.xml

C:\java\apache\velocity\head\build>ant env
Buildfile: build.xml

env:
     [echo]
     [echo]   Global settings:
     [echo]     java.home = C:\Program Files\Java\jdk1.6.0_04\jre
     [echo]     user.home = C:\Documents and Settings\Nathan
     [echo]     java.class.path =
C:\java\apache\ant\1.7.0\lib\ant-launcher.jar;C:\java\apache\velocity\head\build\.;C:\Program
Fi
les\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\java\apache\ant\1.7.0\lib\ant-antlr.jar;C:\java\apache\ant\1.7.0\lib\ant-apache-bcel.ja
r;C:\java\apache\ant\1.7.0\lib\ant-apache-bsf.jar;C:\java\apache\ant\1.7.0\lib\ant-apache-log4j.jar;C:\java\apache\ant\1.7.0\lib\a
nt-apache-oro.jar;C:\java\apache\ant\1.7.0\lib\ant-apache-regexp.jar;C:\java\apache\ant\1.7.0\lib\ant-apache-resolver.jar;C:\java\
apache\ant\1.7.0\lib\ant-commons-logging.jar;C:\java\apache\ant\1.7.0\lib\ant-commons-net.jar;C:\java\apache\ant\1.7.0\lib\ant-jai
.jar;C:\java\apache\ant\1.7.0\lib\ant-javamail.jar;C:\java\apache\ant\1.7.0\lib\ant-jdepend.jar;C:\java\apache\ant\1.7.0\lib\ant-j
mf.jar;C:\java\apache\ant\1.7.0\lib\ant-jsch.jar;C:\java\apache\ant\1.7.0\lib\ant-junit.jar;C:\java\apache\ant\1.7.0\lib\ant-launc
her.jar;C:\java\apache\ant\1.7.0\lib\ant-netrexx.jar;C:\java\apache\ant\1.7.0\lib\ant-nodeps.jar;C:\java\apache\ant\1.7.0\lib\ant-
starteam.jar;C:\java\apache\ant\1.7.0\lib\ant-stylebook.jar;C:\java\apache\ant\1.7.0\lib\ant-swing.jar;C:\java\apache\ant\1.7.0\li
b\ant-testutil.jar;C:\java\apache\ant\1.7.0\lib\ant-trax.jar;C:\java\apache\ant\1.7.0\lib\ant-weblogic.jar;C:\java\apache\ant\1.7.
0\lib\ant.jar;C:\java\apache\ant\1.7.0\lib\catalina-ant.jar;C:\java\apache\ant\1.7.0\lib\jdocs.jar;C:\java\apache\ant\1.7.0\lib\js
ch-0.1.30.jar;C:\java\apache\ant\1.7.0\lib\maven-ant-tasks-2.0.9.jar;C:\java\apache\ant\1.7.0\lib\xercesImpl.jar;C:\java\apache\an
t\1.7.0\lib\xml-apis.jar;C:\Program Files\Java\jdk1.6.0_04\lib\tools.jar
     [echo]
     [echo]   Velocity settings:
     [echo]     Version:     1.6-dev
     [echo]     Debug:       on
     [echo]     Optimize:    on
     [echo]     Deprecation: off
     [echo]
     [echo]   Target settings (relative to build tree root):
     [echo]     Velocity Source:       C:/java/apache/velocity/head/bin/src
     [echo]     Velocity Classes:      C:/java/apache/velocity/head/bin/classes
     [echo]     Velocity API Docs:     C:/java/apache/velocity/head/bin/apidocs
     [echo]     Velocity Docs:         C:/java/apache/velocity/head/bin/docs
     [echo]     Velocity Test Reports:
C:/java/apache/velocity/head/bin/test-reports
     [echo]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by Byron Foster <by...@base2.cc>.
I need a sanity check.  I tested this with an unmodified checkout from  
svn:

URL: http://svn.apache.org/repos/asf/velocity/engine/trunk
Last Changed Author: nbubna
Last Changed Rev: 700847
Last Changed Date: 2008-10-01 10:39:45 -0700 (Wed, 01 Oct 2008)

This is the latest as of now on trunk.  I tested the below case with  
no velocity properties set (running with defaults), and I still get my  
original reported results (Bad Reference "null").  In fact, I tracked  
down the problem (An exception was getting dropped).   So I'm  
wondering if we are looking at the same source base, or maybe there is  
still some condition in my environment that is not in yours.  Can you  
verify that you are using the same source snapshot as myself?


On Oct 1, 2008, at 14:53 , Nathan Bubna (JIRA) wrote:

>
>     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
>  ]
>
> Nathan Bubna updated VELOCITY-620:
> ----------------------------------
>
>    Attachment: Velocity620TestCase.java
>
> For the first of your examples, 1.6-dev (with the standard  
> velocity.properties) works fine, and for the second, i get this  
> helpful error:
>
> org.apache.velocity.exception.ParseErrorException: Encountered "="  
> at line 1, column 9 of #if ($x = "a")
> #end
> Was expecting one of:
>    <RPAREN> ...
>    "-" ...
>    "+" ...
>    "*" ...
>    "/" ...
>    "%" ...
>    <LOGICAL_AND> ...
>    <LOGICAL_OR> ...
>    <LOGICAL_LT> ...
>    <LOGICAL_LE> ...
>    <LOGICAL_GT> ...
>    <LOGICAL_GE> ...
>    <LOGICAL_EQUALS> ...
>    <LOGICAL_NOT_EQUALS> ...
>
>
>> Parse error creates an obscure error message
>> --------------------------------------------
>>
>>                Key: VELOCITY-620
>>                URL: https://issues.apache.org/jira/browse/ 
>> VELOCITY-620
>>            Project: Velocity
>>         Issue Type: Bug
>>         Components: Engine
>>   Affects Versions: 1.6
>>           Reporter: Byron Foster
>>            Fix For: 1.6
>>
>>        Attachments: Velocity620TestCase.java
>>
>>
>> The following incorrect velocity usage:
>> #macro(foo $a)
>>  blaa
>> #end
>> #foo("b" "c")
>> or ...
>> #if ($x = "a")
>> #end
>> will create the obscure error message in the exception:
>>> Bad Reference "null" in /foo.vm:18


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-620) Parse error creates an obscure error message

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELOCITY-620:
----------------------------------

    Attachment: Velocity620TestCase.java

For the first of your examples, 1.6-dev (with the standard velocity.properties) works fine, and for the second, i get this helpful error:

org.apache.velocity.exception.ParseErrorException: Encountered "=" at line 1, column 9 of #if ($x = "a")
#end
Was expecting one of:
    <RPAREN> ...
    "-" ...
    "+" ...
    "*" ...
    "/" ...
    "%" ...
    <LOGICAL_AND> ...
    <LOGICAL_OR> ...
    <LOGICAL_LT> ...
    <LOGICAL_LE> ...
    <LOGICAL_GT> ...
    <LOGICAL_GE> ...
    <LOGICAL_EQUALS> ...
    <LOGICAL_NOT_EQUALS> ...


> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org