org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : ""

Atlassian JIRA | Jens Schumacher | 9 years ago
  1. 0

    The following error is thrown when trying to use the default confluence style in a theme as defined below: <theme key="hostedtheme" i18n-name-key="com.atlassian.confluence.extra.hosted.theme.name" name="Hosted Theme" class="com.atlassian.confluence.themes.BasicTheme"> ... <param name="includeClassicStyles" value="false"/> <resource type="stylesheet" name="confluence.css" location="/templates/hosted/theme/confluence.css" /> </theme> The cause for the errors appears to be the following part from the css: form#quickSearch { margin: 2px; padding: 0; } form#quickSearch input { font-size: 10pt; vertical-align: middle; } If you remove or rename qickSearch, the error disappears. ERROR: ------------------------ Sep 30, 2007 12:45:43 AM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Sep 30, 2007 12:45:43 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 47064 ms 2007-09-30 00:45:55,271 ERROR [http-8080-Processor25] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/styles/combined-css.vm' -- action: main-action org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : "" at org.apache.velocity.Template.process(Template.java:181) at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814) at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94) at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271) at org.apache.velocity.Template.merge(Template.java:296) at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91) at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116) at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47)

    Atlassian JIRA | 9 years ago | Jens Schumacher
    org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : ""
  2. 0

    The following error is thrown when trying to use the default confluence style in a theme as defined below: <theme key="hostedtheme" i18n-name-key="com.atlassian.confluence.extra.hosted.theme.name" name="Hosted Theme" class="com.atlassian.confluence.themes.BasicTheme"> ... <param name="includeClassicStyles" value="false"/> <resource type="stylesheet" name="confluence.css" location="/templates/hosted/theme/confluence.css" /> </theme> The cause for the errors appears to be the following part from the css: form#quickSearch { margin: 2px; padding: 0; } form#quickSearch input { font-size: 10pt; vertical-align: middle; } If you remove or rename qickSearch, the error disappears. ERROR: ------------------------ Sep 30, 2007 12:45:43 AM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Sep 30, 2007 12:45:43 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 47064 ms 2007-09-30 00:45:55,271 ERROR [http-8080-Processor25] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/styles/combined-css.vm' -- action: main-action org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : "" at org.apache.velocity.Template.process(Template.java:181) at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814) at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94) at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271) at org.apache.velocity.Template.merge(Template.java:296) at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91) at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116) at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47)

    Atlassian JIRA | 9 years ago | Jens Schumacher
    org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : ""
  3. 0

    Which version of Velocity Template will support map creation

    Stack Overflow | 4 years ago | sunleo
    org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 5, column 25. Encountered: "{" (123), after : ""
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Velocity - Correct Regex to remove control characters?

    Stack Overflow | 5 years ago | Mikaveli
    org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 13, column 82. Encountered: "p" (112), after : "\"\\"
  6. 0

    When viewing a page with an attachment macro on it the server logs are spammed with the following stack trace. {quote} org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 1, column 2. Encountered: <EOF> after : "" at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1202) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1164) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219) at com.atlassian.confluence.util.velocity.VelocityUtils.writeRenderedContent(VelocityUtils.java:179) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedContent(VelocityUtils.java:157) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedContent(VelocityUtils.java:142) at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedContent(VelocityUtils.java:137) at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebFragmentHelper.renderVelocityFragment(ConfluenceWebFragmentHelper.java:78) at com.atlassian.plugin.web.model.DefaultWebLink.getRenderedUrl(DefaultWebLink.java:35) at com.atlassian.plugin.web.model.DefaultWebLink.getDisplayableUrl(DefaultWebLink.java:45) at com.atlassian.confluence.plugin.descriptor.web.model.ConfluenceWebLink.getDisplayableUrl(ConfluenceWebLink.java:92) at com.atlassian.confluence.plugin.descriptor.web.model.ConfluenceWebLink.getDisplayableUrl(ConfluenceWebLink.java:79) at sun.reflect.GeneratedMethodAccessor457.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:34) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) ... {quote}

    Atlassian JIRA | 2 years ago | Matthew Erickson [Atlassian]
    org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 1, column 2. Encountered: <EOF> after : ""

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.velocity.exception.ParseErrorException

      Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : ""

      at org.apache.velocity.Template.process()
    2. Apache Velocity
      Template.merge
      1. org.apache.velocity.Template.process(Template.java:181)
      2. org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466)
      3. org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
      4. org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
      5. org.apache.velocity.runtime.directive.Parse.render(Parse.java:196)
      6. org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      7. org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      8. org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344)
      9. org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      10. org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      11. org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
      12. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
      13. org.apache.velocity.Template.merge(Template.java:296)
      13 frames
    3. WebWork
      WebWorkResultSupport.execute
      1. com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91)
      2. com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116)
      2 frames
    4. XWork Tiger Extensions
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263)
      2. com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187)
      2 frames
    5. com.opensymphony.xwork
      AroundInterceptor.intercept
      1. com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      1 frame
    6. XWork Tiger Extensions
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      1 frame
    7. com.atlassian.confluence
      LoggingContextInterceptor.intercept
      1. com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48)
      1 frame
    8. XWork Tiger Extensions
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      1 frame
    9. com.atlassian.confluence
      PermissionCheckInterceptor.intercept
      1. com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47)
      1 frame