You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Template error generating HTML report.
freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> recipesFound [in template "upgrade-asciidoc.ftl" at line 46, column 6]
To Reproduce
Steps to reproduce the behavior:
checkout spring petclinic on spring boot 2.4
#!/bin/bash
set -e
source "$HOME/.sdkman/bin/sdkman-init.sh"
project='spring-petclinic-sbm'
wget --no-clobber https://github.com/spring-projects-experimental/spring-boot-migrator/releases/download/0.11.0/spring-boot-migrator.jar
git clone [email protected]:spring-projects/spring-petclinic.git $project
cd $project
#git reset --hard
#git clean -f
git checkout 09e07869ac8cea1d08bd62802d5e0dad97827b87 # commit on 2.4.x
cd -
sdk use java 11.0.15-tem
java -jar spring-boot-migrator.jar
scan spring-petclinic-sbm
apply boot-2.4-2.5-dependency-version-update
apply boot-2.4-2.5-sql-init-properties
apply boot-2.4-2.5-upgrade-report
Expected behavior
A HTML report, possibly with all steps resolved
Stacktrace
spring-petclinic-sbm:> apply boot-2.4-2.5-upgrade-report
Applying recipe 'boot-2.4-2.5-upgrade-report'
.. Create Upgrade Report for a Spring Boot 2.4 Application16:42:24.213 [main] ERROR freemarker.runtime - Error executing FreeMarker template
freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> recipesFound [in template "upgrade-asciidoc.ftl" at line 46, column 6]
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #if recipesFound [in template "upgrade-asciidoc.ftl" at line 46, column 1]
----
at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
at freemarker.core.UnexpectedTypeException.newDescriptionBuilder(UnexpectedTypeException.java:85)
at freemarker.core.UnexpectedTypeException.<init>(UnexpectedTypeException.java:48)
at freemarker.core.NonBooleanException.<init>(NonBooleanException.java:47)
at freemarker.core.Expression.modelToBoolean(Expression.java:195)
at freemarker.core.Expression.evalToBoolean(Expression.java:178)
at freemarker.core.Expression.evalToBoolean(Expression.java:163)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
at freemarker.core.Environment.visit(Environment.java:347)
at freemarker.core.Environment.visit(Environment.java:353)
at freemarker.core.Environment.process(Environment.java:326)
at freemarker.template.Template.process(Template.java:383)
at org.springframework.sbm.boot.upgrade_24_25.actions.Boot_24_25_UpgradeReportAction.renderMarkdown(Boot_24_25_UpgradeReportAction.java:80)
at org.springframework.sbm.boot.upgrade_24_25.actions.Boot_24_25_UpgradeReportAction.apply(Boot_24_25_UpgradeReportAction.java:69)
at org.springframework.sbm.engine.recipe.Action.applyWithStatusEvent(Action.java:37)
at org.springframework.sbm.engine.recipe.Recipe.lambda$apply$2(Recipe.java:97)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at org.springframework.sbm.engine.recipe.Recipe.apply(Recipe.java:97)
at org.springframework.sbm.engine.commands.ApplyCommand.execute(ApplyCommand.java:70)
at org.springframework.sbm.shell.ApplyShellCommand.apply(ApplyShellCommand.java:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
at org.springframework.shell.Shell.evaluate(Shell.java:180)
at org.springframework.shell.Shell.run(Shell.java:142)
at org.springframework.shell.jline.InteractiveShellApplicationRunner.run(InteractiveShellApplicationRunner.java:84)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:803)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:793)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:346)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.sbm.SpringShellApplication.main(SpringShellApplication.java:27)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Action [org.springframework.sbm.boot.upgrade_24_25.actions.Boot_24_25_UpgradeReportAction] with description 'Create Upgrade Report for a Spring Boot 2.4 Application' failed: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> recipesFound [in template "upgrade-asciidoc.ftl" at line 46, column 6]
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #if recipesFound [in template "upgrade-asciidoc.ftl" at line 46, column 1]
----
Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.
Desktop (please complete the following information):
OS: Ubuntu 20.04
Version 11
The text was updated successfully, but these errors were encountered:
Describe the bug
Template error generating HTML report.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A HTML report, possibly with all steps resolved
Stacktrace
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: