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

TemplateEngines.tryLoadEngines should catch all throwables related to class loading issues #567

Closed
kwin opened this issue Nov 12, 2018 · 3 comments · Fixed by #568
Closed

Comments

@kwin
Copy link
Contributor

kwin commented Nov 12, 2018

Currently in

only Exceptions are being caught, but e.g. a java.lang.NoClassDefFoundError is not an Exception but only derived from a Throwable. Since all engines are IMHO optional even a NoClassDefFoundError should be caught and logged. For a concrete use cases where this is an issue look at jbake-org/jbake-maven-plugin#17 (comment).

At the same time it would be reasonable to lower the log level to WARN in (

LOGGER.error("unable to load engine", e);
) as it is perfectly fine if not all template engines are loaded in case they are not actually used.

@kwin
Copy link
Contributor Author

kwin commented Nov 12, 2018

This is a regression caused by 9a0727a. So it only happens since v 2.6.2.

@kwin kwin changed the title TemplateEngines.tryLoadEngines should catch all throwable related to class loading issues TemplateEngines.tryLoadEngines should catch all throwables related to class loading issues Nov 12, 2018
kwin added a commit to kwin/jbake that referenced this issue Nov 12, 2018
Lower loglevel to "WARN" as not all engines need to be loaded in all
circumstances.

This closes jbake-org#567
@kwin
Copy link
Contributor Author

kwin commented Nov 15, 2018

@jonbullock Is it possible to include the linked PR in the upcoming 2.6.4 release? IMHO this is a pretty nasty regression.

@jonbullock
Copy link
Member

Yeah I'll merge that in now.

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

Successfully merging a pull request may close this issue.

2 participants