wisdom-framework / wisdom

A modular and dynamic web framework
http://wisdom-framework.org
Apache License 2.0
88 stars 42 forks source link

TemplateInputException in 0.9.2-SNAPSHOT #528

Closed agonist closed 9 years ago

agonist commented 9 years ago

I'm using the snapshot version and the monitor extension seems to be broken.

If you sign in to http://localhost:9000/monitor/

an exception appear :

easy to reproduce with an empty wisdom project

[1;31m[ERROR]   o.w.t.t.i.WisdomURLResourceResolver {vert.x-eventloop-thread-0} - Cannot resolve the template monitor\layout, neither monitor\layout nor monitor\layout.thl.html exist in the template directory or is available in bundles.
[ERROR]   o.t.TemplateEngine {vert.x-eventloop-thread-0} - [THYMELEAF][vert.x-eventloop-thread-0] Exception processing template "bundle://56.0:0/templates/monitor/dashboard.thl.html": Error resolving template "layout", template might not exist or might not be accessible by any of the configured Template Resolvers (bundle://56.0:0/templates/monitor/dashboard.thl.html:21)
[ERROR]   wisdom-error {vert.x-eventloop-thread-0} - An exception occurred while processing request GET /monitor/dashboard
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "layout", template might not exist or might not be accessible by any of the configured Template Resolvers (bundle://56.0:0/templates/monitor/dashboard.thl.html:21)
        at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:245) ~[na:na]
        at nz.net.ultraq.thymeleaf.decorator.DecoratorProcessor.processAttribute(DecoratorProcessor.java:92) ~[na:na]
        at org.thymeleaf.processor.attr.AbstractAttrProcessor.doProcess(AbstractAttrProcessor.java:87) ~[na:na]
        at org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212) ~[na:na]
        at org.thymeleaf.dom.Node.applyNextProcessor(Node.java:1016) ~[na:na]
        at org.thymeleaf.dom.Node.processNode(Node.java:971) ~[na:na]
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672) ~[na:na]
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655) ~[na:na]
        at org.thymeleaf.dom.Node.processNode(Node.java:990) ~[na:na]
        at org.thymeleaf.dom.Document.process(Document.java:93) ~[na:na]
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1155) ~[na:na]
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060) ~[na:na]
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011) ~[na:na]
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:955) ~[na:na]
        at org.wisdom.template.thymeleaf.impl.WisdomTemplateEngine.process(WisdomTemplateEngine.java:101) ~[na:na]
        at org.wisdom.template.thymeleaf.impl.ThymeLeafTemplateImplementation.render(ThymeLeafTemplateImplementation.java:148) ~[na:na]
        at org.wisdom.template.thymeleaf.impl.ThymeLeafTemplateImplementation.render(ThymeLeafTemplateImplementation.java:160) ~[na:na]
        at org.wisdom.api.templates.Template$$Proxy.render(Unknown Source) ~[na:na]
        at org.wisdom.api.DefaultController.render(DefaultController.java:188) ~[wisdom-api-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.monitor.extensions.dashboard.DashboardExtension.__M_index(DashboardExtension.java:287) ~[na:na]
        at org.wisdom.monitor.extensions.dashboard.DashboardExtension.index(DashboardExtension.java) ~[na:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
        at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
        at org.wisdom.router.RouteDelegate$EndOfChainInvoker.call(RouteDelegate.java:333) ~[na:na]
        at org.wisdom.api.interception.RequestContext.proceed(RequestContext.java:124) [wisdom-api-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.router.security.AuthenticationInterceptor.__M_call(AuthenticationInterceptor.java:79) ~[na:na]
        at org.wisdom.router.security.AuthenticationInterceptor.call(AuthenticationInterceptor.java) ~[na:na]
        at org.wisdom.router.security.AuthenticationInterceptor.__M_call(AuthenticationInterceptor.java:39) ~[na:na]
        at org.wisdom.router.security.AuthenticationInterceptor.call(AuthenticationInterceptor.java) ~[na:na]
        at org.wisdom.api.interception.Interceptor.call(Interceptor.java:64) ~[wisdom-api-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.api.interception.RequestContext.proceed(RequestContext.java:124) [wisdom-api-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.error.DefaultPageErrorHandler.__M_call(DefaultPageErrorHandler.java:236) [default-error-handler-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.error.DefaultPageErrorHandler.call(DefaultPageErrorHandler.java) [default-error-handler-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.api.interception.RequestContext.proceed(RequestContext.java:124) [wisdom-api-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.monitor.extensions.dashboard.HttpMetricFilter.call(HttpMetricFilter.java:126) [org.wisdom.framework.wisdom.monitor-0.9.2-20150615.165810-14.jar:na]
        at org.wisdom.api.interception.RequestContext.proceed(RequestContext.java:124) [wisdom-api-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.router.RouteDelegate.invoke(RouteDelegate.java:247) [router-0.9.2-SNAPSHOT.jar:na]
        at org.wisdom.framework.vertx.HttpHandler.invoke(HttpHandler.java:173) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.wisdom.framework.vertx.HttpHandler.dispatch(HttpHandler.java:146) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.wisdom.framework.vertx.HttpHandler.access$200(HttpHandler.java:51) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.wisdom.framework.vertx.HttpHandler$2.handle(HttpHandler.java:105) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.VoidHandler.handle(VoidHandler.java:27) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.VoidHandler.handle(VoidHandler.java:24) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.DefaultHttpServerRequest.handleEnd(DefaultHttpServerRequest.java:334) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.ServerConnection.handleEnd(ServerConnection.java:209) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.ServerConnection.processMessage(ServerConnection.java:313) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.ServerConnection.handleMessage(ServerConnection.java:94) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.DefaultHttpServer$ServerHandler.doMessageReceived(DefaultHttpServer.java:710) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.DefaultHttpServer$ServerHandler.doMessageReceived(DefaultHttpServer.java:600) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.http.impl.VertxHttpHandler.channelRead(VertxHttpHandler.java:72) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at org.vertx.java.core.net.impl.VertxHandler.channelRead(VertxHandler.java:155) [wisdom-vertx-engine-0.9.2-SNAPSHOT.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-codec-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [netty-codec-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242) [netty-codec-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [netty-transport-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111) [netty-common-4.0.27.Final.jar:4.0.27.Final]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
amischler commented 9 years ago

Any update on this issue? (workaround, plan to fix it) This is quite annoying since it prevents the wisdom-monitor from being used, which does not simplify debugging...and unfortunately we can't use the previous stable version due to required features in the SNAPSHOT version. Thanks.

cescoffier commented 9 years ago

I'm on it.

cescoffier commented 9 years ago

Well, I'm unable to reproduce it.

I've create a new project with:

mvn org.wisdom-framework:wisdom-maven-plugin:0.10.0-SNAPSHOT:create \
 -DgroupId=org.acme \
 -DartifactId=acme-sample \
 -Dversion=1.0-SNAPSHOT

Launched it with mvn clean wisdom:run

And open my browser to http://localhost:9000. I've entered the credentials, and everything is working. No stack trace or whatsoever.

Please provide a reproducer if you still have this issue (and reopen it)