Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when DebugScreen needs to show debug screen #5

Open
i07 opened this issue May 7, 2017 · 0 comments
Open

Getting error when DebugScreen needs to show debug screen #5

i07 opened this issue May 7, 2017 · 0 comments

Comments

@i07
Copy link

i07 commented May 7, 2017

Any help would be appreciated.

The details:

Using Maven 4

versions of spark dependencies in project.

<dependency>
  <groupId>com.sparkjava</groupId>
  <artifactId>spark-core</artifactId>
  <version>2.5.5</version>
</dependency>
<dependency>
  <groupId>com.sparkjava</groupId>
  <artifactId>spark-debug-tools</artifactId>
  <version>0.5</version>
</dependency>
<dependency>
  <groupId>com.sparkjava</groupId>
  <artifactId>spark-template-freemarker</artifactId>
  <version>2.3</version>
</dependency>

Partial dump of error message:

On my end, forced an exception

Caught Exception:

FreeMarker template error:
The following has evaluated to null or missing:
==> message [in template "freemarker/base.ftl" at line 6, column 14]

Tip: If the failing expression is known to be 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. (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: ${message.get("WEBSITE_TITLE")} [in template "freemarker/base.ftl" in macro "masterTemplate" at line 6, column 12]
- Reached through: @layout.masterTemplate title="index" [in template "freemarker/index/index.ftl" at line 2, column 1]

This is the DebugScreen bit:

Caught Exception Rendering DebugScreen:

java.lang.IllegalArgumentException: freemarker.core._MiscTemplateException: Can't convert boolean to string automatically, because the "boolean_format" setting was "true,false", which is the legacy default computer-language format, and hence isn't accepted.

Tip: If you just want "true"/"false" result as you are generting computer-language output, use "?c", like ${myBool?c}.

Tip: You can write myBool?string('yes', 'no') and like to specify boolean formatting in place.

Tip: If you need the same two values on most places, the programmers should set the "boolean_format" setting to something like "yes,no".

FTL stack trace ("~" means nesting-related):
- Failed at: ${data[k]} auto-escaped [in template "debugscreen.ftl" at line 107, column 54]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant