You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "Xiang Gao (Jira)" <ji...@apache.org> on 2021/08/05 21:15:00 UTC
[jira] [Created] (FREEMARKER-186) IllegalStateException when
running on high performance machine
Xiang Gao created FREEMARKER-186:
------------------------------------
Summary: IllegalStateException when running on high performance machine
Key: FREEMARKER-186
URL: https://issues.apache.org/jira/browse/FREEMARKER-186
Project: Apache Freemarker
Issue Type: Bug
Components: engine
Affects Versions: 2.3.30
Reporter: Xiang Gao
The freemarker is packaged into jar using shade plugin.
In the generated jar, verified the required policy file {{"DefaultMemberAccessPolicy-rules"}} is with the same folder as "DefaultMemberAccessPolicy.java".
It is working fine on local/VM, but has intermittent failure (~50%) on high performance build machine due to resource not found([https://github.com/apache/freemarker/blob/201533eb7c15e3cfc55b38da37f730a3492bec0f/src/main/java/freemarker/ext/beans/DefaultMemberAccessPolicy.java#L164),] and it throws IllegalStateException.
Is this a classloader reason, checked some articles suggest to use but not sure
getClassLoader().getResourceAsStream("DefaultMemberAccessPolicy-rules")
--
This message was sent by Atlassian Jira
(v8.3.4#803005)