You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "Dániel Dékány (Jira)" <ji...@apache.org> on 2021/08/05 22:05:00 UTC

[jira] [Commented] (FREEMARKER-186) IllegalStateException when running on high performance machine

    [ https://issues.apache.org/jira/browse/FREEMARKER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394326#comment-17394326 ] 

Dániel Dékány commented on FREEMARKER-186:
------------------------------------------

Not sure why this happens. Can you share the stack trace?

> 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
>            Priority: Major
>              Labels: easyfix
>
> 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)