freemarker.template.TemplateModelException: Underlying collection is not a list, it's com.google.common.collect.Collections2$FilteredCollection

Atlassian JIRA | Anatoli Kazatchkov [Atlassian] | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 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
  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

    Struts 2 Hibernate 3 Integration Example with Spring 3 | DOJ Software Consultant | Dinesh on Java

    dineshonjava.com | 1 year ago
    freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.JDBCConnectionException: Cannot open connection
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Struts 2 Hibernate 3 Integration Example with Spring 3 | DOJ Software Consultant | Dinesh on Java

    dineshonjava.com | 2 years ago
    freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.JDBCConnectionException: Cannot open connection
  6. 0

    *Steps to replicate* # Create a Plan with subversion as the source repository # Under the advanced tab of the repository configuration specify *Generic web repository* as described [here|https://confluence.atlassian.com/display/BAMBOO041/Subversion] # Specify the viewVC URL to the repository. example http://localhost:49152/viewvc/Development/ # The above settings should make it possible for Bamboo to display in the code changes, the link to relevant files that have changed. # This does not work and the code changes tab in the build summary page displays a tooltip "Unable to create URL - please check your Web Repository configuration" in place of the expected links # The following is thrown in the logs {noformat} 2012-08-14 16:56:19,380 ERROR [qtp179274584-709] [runtime] Method public java.lang.String com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer.getWebRepositoryUrlForFile(com.atlassian.bamboo.commit.CommitFile,com.atlassian.bamboo.repository.RepositoryDefinition) threw an exception when invoked on com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer@69a13712 Method public java.lang.String com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer.getWebRepositoryUrlForFile(com.atlassian.bamboo.commit.CommitFile,com.atlassian.bamboo.repository.RepositoryDefinition) threw an exception when invoked on com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer@69a13712 The problematic instruction: ---------- ==> assignment: fileLink=linkGenerator.getWebRepositoryUrlForFile(file, repositoryData)! [on line 30, column 24 in templates/plugins/webRepository/defaultCommitView.ftl] in user-directive ui.bambooInfoDisplay [on line 5, column 5 in templates/plugins/webRepository/defaultCommitView.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public java.lang.String com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer.getWebRepositoryUrlForFile(com.atlassian.bamboo.commit.CommitFile,com.atlassian.bamboo.repository.RepositoryDefinition) threw an exception when invoked on com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer@69a13712 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.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.IteratorBlock$Context.runLoop(IteratorBlock.java:167) at freemarker.core.Environment.visit(Environment.java:417) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) 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.IteratorBlock$Context.runLoop(IteratorBlock.java:179) 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 | 5 years ago | Sultan Maiyaki [Atlassian]
    freemarker.template.TemplateModelException: Method public java.lang.String com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer.getWebRepositoryUrlForFile(com.atlassian.bamboo.commit.CommitFile,com.atlassian.bamboo.repository.RepositoryDefinition) threw an exception when invoked on com.atlassian.bamboo.webrepository.DefaultWebRepositoryViewer@69a13712

    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

      Underlying collection is not a list, it's com.google.common.collect.Collections2$FilteredCollection

      at freemarker.ext.beans.CollectionModel.get()
    2. FreeMarker
      Environment.visit
      1. freemarker.ext.beans.CollectionModel.get(CollectionModel.java:126)
      2. freemarker.core.SequenceBuiltins$chunkBI$ChunkedSequence$1.get(SequenceBuiltins.java:749)
      3. freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:176)
      4. freemarker.core.Environment.visit(Environment.java:417)
      5. freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
      6. freemarker.core.Environment.visit(Environment.java:210)
      6 frames