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

Initialization of Themes object raises an NPE in offline execution #26

Closed
danielfernandez opened this issue Jun 16, 2013 · 3 comments
Closed

Comments

@danielfernandez
Copy link
Member

When using the Spring-enabled template engine (SpringTemplateEngine class) in an offline environment, a NullPointerException is raised by the Themes object constructor.

See http://forum.thymeleaf.org/Help-needed-with-TemplateProcessingException-Exception-evaluating-SpringEL-expression-td4026209.html

This happens because, in offline execution, no Spring RequestContext object is available.

Should be fixable by first checking whether we are in an online (IWebContext) or offline (IContext) scenario before creating the Themes instance.

@danielfernandez
Copy link
Member Author

@danielfernandez
Copy link
Member Author

Reopening this. Due to a very weird issue during the packaging of 2.0.18 distribution jars, this is solved both in 2.0.18-SNAPSHOT and 2.0.19-SNAPSHOT, but not in 2.0.18 release. Tests went OK because they execute on the snapshot versions (both last 2.0.18-SNAPSHOT and first 2.0.19-SNAPSHOT contain the fix).

Will have to release 2.0.19 really soon in order to solve this (and the javascript inlining stuff at the core) definitively :-(

@danielfernandez
Copy link
Member Author

Nah, false alarm. 2.0.18 works just fine and this fix is correctly included. Closing again. Sorry!

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

No branches or pull requests

2 participants