[undertow-dev] java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader

Shiva Saxena shivasaxena999 at gmail.com
Sat Mar 5 05:51:06 EST 2016


Hi,

I am just creating a Hello world example of undertow.js like so

$undertow
.onGet("/hello-freemarker",
   {template: '/resources/hello.ftl','template_type': 'freemarker',
headers: {"content-type": "text/plain"}},
   [function ($exchange) {
       return {data: 'Hello World!'};
   }]);

When deploying the project I am getting the following exception

ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 2)
MSC000001: Failed to start service
jboss.undertow.deployment.default-server.default-host./undertowjs-example:
org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./undertowjs-example:
java.util.ServiceConfigurationError:
io.undertow.js.templates.TemplateProvider: Provider
io.undertow.js.templates.freemarker.FreemarkerTemplateProvider could not be
instantiated
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I have also added the freemarker jar file in the modules folder but it
still doesn't  help. Please let me know what I might be doing wrong or is
come extra conf required.

-- 
Best Regards
*Shiva Saxena*
*Mobile : +91-9889787094                            *
*Blog <http://metalop.com/> | Linkedin
<http://in.linkedin.com/in/shivasaxena/> | StackOverflow
<http://stackoverflow.com/users/2490343/shiva>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20160305/67c8d52a/attachment-0001.html 


More information about the undertow-dev mailing list