<div dir="ltr">Hi,<br><br>I did add the freemarker maven dependency in the project, and after the build its there in the WEB-INF/lib folder too, yet the issue persists.<br><br>Am I missing the something, or something more is expected?<br><br>PS: The project can be found @ <a href="https://github.com/shivasaxena/undertow-js-example">https://github.com/shivasaxena/undertow-js-example</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 8, 2016 at 3:44 AM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wildfly only bundles the mustache template library by default, if you want to use Freemarker you need to bundle it in your deployment.<br>
<br>
Stuart<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Shiva Saxena&quot; &lt;<a href="mailto:shivasaxena999@gmail.com">shivasaxena999@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; Sent: Saturday, 5 March, 2016 9:51:06 PM<br>
&gt; Subject: [undertow-dev] java.lang.NoClassDefFoundError:       freemarker/cache/TemplateLoader<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am just creating a Hello world example of undertow.js like so<br>
&gt;<br>
&gt; $undertow<br>
&gt; .onGet(&quot;/hello-freemarker&quot;,<br>
&gt; {template: &#39;/resources/hello.ftl&#39;,&#39;template_type&#39;: &#39;freemarker&#39;, headers:<br>
&gt; {&quot;content-type&quot;: &quot;text/plain&quot;}},<br>
&gt; [function ($exchange) {<br>
&gt; return {data: &#39;Hello World!&#39;};<br>
&gt; }]);<br>
&gt; When deploying the project I am getting the following exception<br>
&gt;<br>
&gt; ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 2)<br>
&gt; MSC000001: Failed to start service<br>
&gt; jboss.undertow.deployment.default-server.default-host./undertowjs-example:<br>
&gt; org.jboss.msc.service.StartException in service<br>
&gt; jboss.undertow.deployment.default-server.default-host./undertowjs-example:<br>
&gt; java.util.ServiceConfigurationError:<br>
&gt; io.undertow.js.templates.TemplateProvider: Provider<br>
&gt; io.undertow.js.templates.freemarker.FreemarkerTemplateProvider could not be<br>
&gt; instantiated<br>
&gt; at<br>
&gt; org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)<br>
&gt; at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)<br>
&gt; at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br>
&gt; at<br>
&gt; java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
&gt; at<br>
&gt; java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
&gt; at java.lang.Thread.run(Thread.java:745)<br>
&gt;<br>
&gt; I have also added the freemarker jar file in the modules folder but it still<br>
&gt; doesn&#39;t help. Please let me know what I might be doing wrong or is come<br>
&gt; extra conf required.<br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt; Best Regards<br>
&gt; Shiva Saxena<br>
&gt; Mobile : +91-9889787094<br>
&gt; Blog | Linkedin | StackOverflow<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; undertow-dev mailing list<br>
&gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="Calibri,sans-serif" color="#000000" style="font-family:Calibri,sans-serif"><div style="line-height:21.2999992370605px"><font size="2">Best Regards</font></div></font><div style="line-height:21.2999992370605px;color:rgb(68,68,68);font-family:Calibri,sans-serif"><font color="#2672ec" style="line-height:normal"><span style="line-height:21px"><font style="line-height:normal"><b style="line-height:22.7199993133545px"><font face="Calibri" style="line-height:normal" size="2">Shiva Saxena</font></b></font></span><font face="Calibri"><br style="line-height:21px"><span style="line-height:21px"><font style="line-height:normal" size="2"><b style="line-height:18.4599990844727px">Mobile : +91-9889787094                            </b></font></span></font></font><div style="line-height:21px"><font style="line-height:normal" size="2"><b style="line-height:18.4599990844727px"><font face="Calibri" color="#2672ec" style="line-height:normal"><a href="http://metalop.com/" style="line-height:18.4599990844727px;font-weight:inherit;color:blue" target="_blank">Blog</a></font><font color="#444444" style="line-height:normal"> | <a href="http://in.linkedin.com/in/shivasaxena/" style="line-height:18.4599990844727px;font-weight:inherit;color:blue" target="_blank">Linkedin</a> | <a href="http://stackoverflow.com/users/2490343/shiva" style="line-height:18.4599990844727px;font-weight:inherit;color:blue" target="_blank">StackOverflow</a></font></b></font></div></div></div></div></div></div>
</div>