看是空指针的问题。blogTitle 怎么会为空呢,报错代码如下:
[ERROR]-[2019-03-25 07:25:48]-[org.b3log.latke.servlet.HttpControl:104]: Request [
method=GET,
URL=http://backend/,
contentType=null,
characterEncoding=UTF-8,
local=[
addr=127.0.0.1,
port=xx,
name=127.0.0.1],
remote=[
addr=127.0.0.1,
port=xxx,
host=127.0.0.1],
headers=[
Cookie=b3log-latke="{\"userPassword\":\"11\",\"userEmail\":\"11@qq.com\"}"; skin=; visited="[\"/articles/2019/03/23/1553295398628.html\",\"/\",\"/archives.html\",\"/links.html\",\"/pages/1470814654552.html\",\"/articles/2016/08/30/1472545022261.html\"]"
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Upgrade-Insecure-Requests=1
Connection=close
User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Host=backend
Accept-Encoding=gzip, deflate
Accept-Language=zh-CN,zh;q=0.9,en;q=0.8
]
] processing failed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.b3log.latke.servlet.handler.MethodInvokeHandler.handle(MethodInvokeHandler.java:58)
at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:99)
at org.b3log.latke.servlet.handler.AdviceHandler.handle(AdviceHandler.java:108)
at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:99)
at org.b3log.latke.servlet.handler.ArgsHandler.handle(ArgsHandler.java:60)
at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:99)
at org.b3log.latke.servlet.handler.RequestDispatchHandler.handle(RequestDispatchHandler.java:92)
at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:99)
at org.b3log.latke.servlet.handler.RequestPrepareHandler.handle(RequestPrepareHandler.java:45)
at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:99)
at org.b3log.latke.servlet.handler.StaticResourceHandler.handle(StaticResourceHandler.java:119)
at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:99)
at org.b3log.latke.servlet.DispatcherServlet.service(DispatcherServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.b3log.solo.filter.InitCheckFilter.doFilter(InitCheckFilter.java:87)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.b3log.solo.filter.PermalinkFilter.doFilter(PermalinkFilter.java:92)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.b3log.latke.servlet.filter.EncodingFilter.doFilter(EncodingFilter.java:71)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.b3log.solo.processor.util.Filler.fillIndexArticles(Filler.java:204)
at org.b3log.solo.processor.util.Filler_$$_jvstf10_33._d5fillIndexArticles(Filler_$$_jvstf10_33.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:106)
at org.b3log.solo.processor.util.Filler_$$_jvstf10_33.fillIndexArticles(Filler_$$_jvstf10_33.java)
at org.b3log.solo.processor.IndexProcessor.showIndex(IndexProcessor.java:152)
at org.b3log.solo.processor.IndexProcessor_$$_jvstf10_29._d8showIndex(IndexProcessor_$$_jvstf10_29.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:106)
at org.b3log.solo.processor.IndexProcessor_$$_jvstf10_29.showIndex(IndexProcessor_$$_jvstf10_29.java)
... 43 more
[ERROR]-[2019-03-25 07:25:48]-[org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer:138]: FreeMarker renders error
FreeMarker template error:
The following has evaluated to null or missing:
==> blogTitle [in template "index.ftl" at line 5, column 25]
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${blogTitle} [in template "index.ftl" at line 5, column 23]
- Reached through: @head title="${blogTitle}" [in template "index.ftl" at line 5, column 9]
----
Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131)
at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:355)
at freemarker.core.Expression.evalAndCoerceToString(Expression.java:82)
at freemarker.core.DollarVariable.accept(DollarVariable.java:41)
at freemarker.core.Environment.visit(Environment.java:324)
at freemarker.core.MixedContent.accept(MixedContent.java:54)
at freemarker.core.Environment.visit(Environment.java:324)
at freemarker.core.Environment.renderElementToString(Environment.java:2196)
at freemarker.core.StringLiteral.evalAndCoerceToString(StringLiteral.java:96)
at freemarker.core.StringLiteral._eval(StringLiteral.java:73)
at freemarker.core.Expression.eval(Expression.java:78)
at freemarker.core.Environment.setMacroContextLocalsFromArguments(Environment.java:739)
at freemarker.core.Environment.invoke(Environment.java:689)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:84)
at freemarker.core.Environment.visit(Environment.java:324)
at freemarker.core.MixedContent.accept(MixedContent.java:54)
at freemarker.core.Environment.visit(Environment.java:324)
at freemarker.core.Environment.process(Environment.java:302)
at freemarker.template.Template.process(Template.java:325)
at org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer.genHTML(AbstractFreeMarkerRenderer.java:162)
at org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer.render(AbstractFreeMarkerRenderer.java:133)
at org.b3log.latke.servlet.DispatcherServlet.result(DispatcherServlet.java:111)
at org.b3log.latke.servlet.DispatcherServlet.service(DispatcherServlet.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.b3log.solo.filter.InitCheckFilter.doFilter(InitCheckFilter.java:87)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.b3log.solo.filter.PermalinkFilter.doFilter(PermalinkFilter.java:92)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.b3log.latke.servlet.filter.EncodingFilter.doFilter(EncodingFilter.java:71)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于