Hi All,
I am getting the following error when I am trying to get a template from the configuration object.
java.lang.ExceptionInInitializerError: java.lang.RuntimeException: Could not load unsafe method java.lang.Runtime.removeShutdownHook(java.lang.Thread) java.lang.NoSuchMethodException removeShutdownHook
at freemarker.ext.beans.BeansWrapper.createUnsafeMethodsSet(BeansWrapper.java, Compiled Code)
at freemarker.ext.beans.BeansWrapper.<clinit>(BeansWrapper.java:82)
at freemarker.template.Constants.<clinit>(Constants.java:54)
at freemarker.template.FMParser.StringOutput(FMParser.java:840)
at freemarker.template.FMParser.Content(FMParser.java, Compiled Code)
at freemarker.template.FMParser.OptionalBlock(FMParser.java:1864)
at freemarker.template.Template.<init>(Template.java, Compiled Code)
at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:252)
at freemarker.template.Configuration.getTemplate(Configuration.java:284)
at freemarker.template.Configuration.getTemplate(Configuration.java:250)
at ultimateemailer.EmailSender.main(EmailSender.java:49)
Exception in thread "main"
I am using the sample code provided in the documentation (http://freemarker.sourceforge.net/docs/pgui_quickstart_all.html). Can anyone tell me why this is happening.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I confirm that this is a bug - the method you get stuck on is a method introduced in JDK 1.3, and if it isn't present, the thing blows up... I'll fix this tommorow morning (it's late now here in Hungary), and provide you with a fix.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have fixed your problem. Could you tell me which version of FreeMarker are you using so I can send you a patched freemarker.jar for the correct version you're using.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
I am getting the following error when I am trying to get a template from the configuration object.
java.lang.ExceptionInInitializerError: java.lang.RuntimeException: Could not load unsafe method java.lang.Runtime.removeShutdownHook(java.lang.Thread) java.lang.NoSuchMethodException removeShutdownHook
at freemarker.ext.beans.BeansWrapper.createUnsafeMethodsSet(BeansWrapper.java, Compiled Code)
at freemarker.ext.beans.BeansWrapper.<clinit>(BeansWrapper.java:82)
at freemarker.template.Constants.<clinit>(Constants.java:54)
at freemarker.template.FMParser.StringOutput(FMParser.java:840)
at freemarker.template.FMParser.Content(FMParser.java, Compiled Code)
at freemarker.template.FMParser.OptionalBlock(FMParser.java:1864)
at freemarker.template.Template.<init>(Template.java, Compiled Code)
at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:252)
at freemarker.template.Configuration.getTemplate(Configuration.java:284)
at freemarker.template.Configuration.getTemplate(Configuration.java:250)
at ultimateemailer.EmailSender.main(EmailSender.java:49)
Exception in thread "main"
I am using the sample code provided in the documentation (http://freemarker.sourceforge.net/docs/pgui_quickstart_all.html). Can anyone tell me why this is happening.
I confirm that this is a bug - the method you get stuck on is a method introduced in JDK 1.3, and if it isn't present, the thing blows up... I'll fix this tommorow morning (it's late now here in Hungary), and provide you with a fix.
I have fixed your problem. Could you tell me which version of FreeMarker are you using so I can send you a patched freemarker.jar for the correct version you're using.