freemarker.template.TemplateModelException: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 66 ((unsigned|signed|long|short|\s+)\*\[a-zA-Z\_\]\w\*)\s+(\[a-zA-Z\_\]\w\*)(?\\\[(\[a-zA-Z\_\]\w\*|\d+)\\\])\s\*;                                                                ^

freemarker | nobody | 10 years ago
  1. 0

    regex problem...

    freemarker | 10 years ago | nobody
    freemarker.template.TemplateModelException: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 66 ((unsigned|signed|long|short|\s+)\*\[a-zA-Z\_\]\w\*)\s+(\[a-zA-Z\_\]\w\*)(?\\\[(\[a-zA-Z\_\]\w\*|\d+)\\\])\s\*;                                                                ^
  2. 0

    Problem found when using jira bamboo plugin (possibly applicable to other screens). Java code returns Collection but freemarker wants to treat it as a list: BuildResultSummary.getArtifactsLinks(thatExist) {noformat} Underlying collection is not a list, it's com.google.common.collect.Collections2$FilteredCollection The problematic instruction: ---------- ==> list artifactLinkRow as artifactLink [on line 93, column 25 in fragments/plan/displayWideBuildPlansList.ftl] in user-directive showFullSummaryDetails [on line 189, column 5 in fragments/plan/displayWideBuildPlansList.ftl] in user-directive planList.showBuildResultSummary [on line 19, column 9 in fragments/buildResults/issueFocussedBuildResults.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Underlying collection is not a list, it's com.google.common.collect.Collections2$FilteredCollection at freemarker.ext.beans.CollectionModel.get(CollectionModel.java:126) at freemarker.core.SequenceBuiltins$chunkBI$ChunkedSequence$1.get(SequenceBuiltins.java:749) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:176) at freemarker.core.Environment.visit(Environment.java:417) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at freemarker.core.Environment.visit(Environment.java:210) {noformat}

    Atlassian JIRA | 7 years ago | Anatoli Kazatchkov [Atlassian]
    freemarker.template.TemplateModelException: Underlying collection is not a list, it's com.google.common.collect.Collections2$FilteredCollection
  3. 0

    Found in JBAC's logs this morning {noformat} 2013-08-15 22:53:08,509 ERROR [qtp717881621-1481] [runtime] Method public com.atlassian.bamboo.v2.build.agent.BuildAgent com.atlassian.bamboo.ww2.actions.chains.ViewChainResult.getAgent(long) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainResult@3d451476 Method public com.atlassian.bamboo.v2.build.agent.BuildAgent com.atlassian.bamboo.ww2.actions.chains.ViewChainResult.getAgent(long) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainResult@3d451476 The problematic instruction: ---------- ==> assignment: agent=action.getAgent(jobSummary.buildAgentId)! [on line 34, column 21 in chain/view/viewChainResult.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public com.atlassian.bamboo.v2.build.agent.BuildAgent com.atlassian.bamboo.ww2.actions.chains.ViewChainResult.getAgent(long) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainResult@3d451476 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:104) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.DefaultToExpression._getAsTemplateModel(DefaultToExpression.java:100) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Assignment.accept(Assignment.java:90) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) {noformat}

    Atlassian JIRA | 3 years ago | Martin Meinhold
    freemarker.template.TemplateModelException: Method public com.atlassian.bamboo.v2.build.agent.BuildAgent com.atlassian.bamboo.ww2.actions.chains.ViewChainResult.getAgent(long) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainResult@3d451476
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    niunb.com | 6 months ago
    freemarker.template.TemplateModelException: Don't know how to present an object of this type to a template: cn.domain.News
  6. 0

    Freemarker template not able to parse the Java object

    Stack Overflow | 2 years ago
    freemarker.template.TemplateModelException: Don't know how to present an object of this type to a template: org.test.config.TransformerInfoBuilder

    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. freemarker.template.TemplateModelException

      java.util.regex.PatternSyntaxException: Unknown inline modifier near index 66 ((unsigned|signed|long|short|\s+)\*\[a-zA-Z\_\]\w\*)\s+(\[a-zA-Z\_\]\w\*)(?\\\[(\[a-zA-Z\_\]\w\*|\d+)\\\])\s\*;                                                                ^

      at freemarker.core.RegexBuiltins.getPattern()
    2. FreeMarker
      RegexBuiltins$MatcherBuilder.exec
      1. freemarker.core.RegexBuiltins.getPattern(RegexBuiltins.java:85)
      2. freemarker.core.RegexBuiltins$MatcherBuilder.exec(RegexBuiltins.java:280)
      2 frames