Menu

#101 JSR-223 not supported in current releases

2.4.1+
open-accepted
nobody
None
5
2014-10-12
2010-01-07
Kek
No

I downloaded Freemarker 2.3.16 and try to use it through Java6 JSR-223 scripting API, I follow your documentation http://freemarker.org/docs-24pre1/pgui_misc_jsr223.html but without success, there is "You need not do anything special, just have freemarker.jar in your classpath for this to work.".

After some investigation I found that the problem is in Freemarker distribution, the freemarker.jar does not supports the JSR-223, because there is no META-INF/services/javax.script.ScriptEngineFactory configuration file, and no Fremarker-ScriptEngineFactory is provided in jar.

I try to search in your SVN repository and found the required sources in TRUNK:
http://freemarker.svn.sourceforge.net/viewvc/freemarker/trunk/freemarker/src/freemarker/ext/script/
http://freemarker.svn.sourceforge.net/viewvc/freemarker/trunk/freemarker/src/META-INF/

but these files are not included to Freemarker-builds. The SVN-TAGs http://freemarker.svn.sourceforge.net/viewvc/freemarker/tags/ does not contains these files any more.

The workaround is build these files from SVN myself or use the https://scripting.dev.java.net/ factory, that supports Freemarker for JSR-223.

Please repair the build or change documentation - how to use Freemarker with JSR-223 API.

Discussion

  • Dániel Dékány

    This was only working in 2.4, not in the stable 2.3 branch. You was reading the docs of a 2.4 preview. Surely that 2.4 branch has died since then though... but this meant to be added to the next 2.4 series.

     

    Last edit: Dániel Dékány 2014-06-15
  • Dániel Dékány

    • status: open --> closed-invalid
    • Group: --> undecided
     
  • Dániel Dékány

    Ticket moved from /p/freemarker/bugs/304/

     
  • Dániel Dékány

    Ticket moved from /p/fmpp/feature-requests/27/

     
  • Dániel Dékány

    • status: closed-invalid --> open-accepted
    • Group: undecided -->
     
  • Dániel Dékány

    • Group: --> 2.4.1
     

Log in to post a comment.

MongoDB Logo MongoDB