Velocity
  1. Velocity
  2. VELOCITY-561

Parse failures occur for cases involving a line comment that contains a multi-line comment.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP Pro, Velocity 1.4 release which is part of spring-framework-1.2.8 download.

      Description

      Created a line (amongst several) which contained the following:

        1. #* *# $ {user The source of the problem seems to come from having a multi-line comment follow a line comment. Other character sequences after these comments appear to cause other subsequence parer error. The above example causes the following parser error: Caused by: org.apache.velocity.exception.ParseErrorException: Encountered "\r\n" at line 60, column 16. Was expecting one of: "}

          " ...
          <DOT> ...

      at org.apache.velocity.Template.process(Template.java:141)
      at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:423)
      at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
      at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
      at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:813)
      at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:470)
      at iht.mail.velocity.VelocityEmailTemplateFactory.getTemplate(VelocityEmailTemplateFactory.java:280)
      ... 2 more

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551390 ] jira [ 12552193 ]
        Mark Thomas made changes -
        Workflow jira [ 12410505 ] Default workflow, editable Closed status [ 12551390 ]
        Nathan Bubna made changes -
        Fix Version/s 1.5.1 [ 12312375 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Nathan Bubna added a comment -

        I think it's highly unlikely that there will be a 1.5.1 at this point. I'm going to start closing these left open as "reminders to include in 1.6". If you want to find these again, search for 1.5.1 CANDIDATE in issue comments.

        Show
        Nathan Bubna added a comment - I think it's highly unlikely that there will be a 1.5.1 at this point. I'm going to start closing these left open as "reminders to include in 1.6". If you want to find these again, search for 1.5.1 CANDIDATE in issue comments.
        Hide
        Will Glass-Husain added a comment -

        Fixed this and committed patch to svn head (for version 1.6). Leaving bug open so that we can apply it later to velocity 1.5 branch.

        Show
        Will Glass-Husain added a comment - Fixed this and committed patch to svn head (for version 1.6). Leaving bug open so that we can apply it later to velocity 1.5 branch.
        Will Glass-Husain made changes -
        Fix Version/s 1.5.1 [ 12312375 ]
        Will Glass-Husain made changes -
        Field Original Value New Value
        Fix Version/s 1.6 [ 12310290 ]
        Hide
        Will Glass-Husain added a comment -

        Thanks for reporting this. We fixed a number of issues like this with Velocity 1.5 - does this problem still exist in the later version?

        Show
        Will Glass-Husain added a comment - Thanks for reporting this. We fixed a number of issues like this with Velocity 1.5 - does this problem still exist in the later version?
        Jeff Greimann created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeff Greimann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development