Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error when opening Topic

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the topic is clicked I am getting this error:

<!-- BEGIN ERROR STACK TRACE <br /> net.jforum.exceptions.ForumException: java.lang.reflect.InvocationTargetException <br /> at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:597) <br /> at net.jforum.Command.process(Command.java:114) <br /> at net.jforum.JForum.processCommand(JForum.java:217) <br /> at net.jforum.JForum.service(JForum.java:200) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) <br /> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) <br /> at java.lang.Thread.run(Thread.java:619) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 22 more <br /> Caused by: java.lang.NullPointerException <br /> at net.jforum.view.forum.common.PostCommon.processSmilies(PostCommon.java:267) <br /> at net.jforum.view.forum.common.PostCommon.prepareTextForDisplayExceptCodeTag(PostCommon.java:227) <br /> at net.jforum.view.forum.common.PostCommon.processText(PostCommon.java:113) <br /> at net.jforum.view.forum.common.PostCommon.preparePostForDisplay(PostCommon.java:97) <br /> at net.jforum.view.forum.common.PostCommon.topicPosts(PostCommon.java:359) <br /> at net.jforum.view.forum.PostAction.list(PostAction.java:166) <br /> ... 22 more <br /> <br /> URL is: /posts/list/588.page?null <br /> END ERROR STACK TRACE-->

any pointers
[originally posted on jforum.net by judekm]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was reported some days ago, and appears that for some reason the smlies cache gets null. First of all, do you have any smilies? (Admin Panel -> Smlies). If so, try reseting the cache at Admin Panel -> Cache -> Smiles -> Reload

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the smilies don't come with the source files of Jforum then I do not have them. I had built Jforum from the source.

When go to cache link in the Admin Control Panel >>> this is what I get

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression smilies.getSmilies() is undefined on line 49, column 54 in default/admin/cache_list.htm.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:232)
at net.jforum.JForum.processCommand(JForum.java:233)
at net.jforum.JForum.service(JForum.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
<!-- BEGIN ERROR STACK TRACE <br /> <br /> Expression smilies.getSmilies() is undefined on line 49, column 54 in default/admin/cache_list.htm. <br /> The problematic instruction: <br /> ---------- <br /> == ${smilies.getSmilies().size()} [on line 49, column 52 in default/admin/cache_list.htm] <br /> ---------- <br /> <br /> Java backtrace for programmers: <br /> ---------- <br /> freemarker.core.InvalidReferenceException: Expression smilies.getSmilies() is undefined on line 49, column 54 in default/admin/cache_list.htm. <br /> at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) <br /> at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134) <br /> at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) <br /> at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) <br /> at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86) <br /> at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) <br /> at freemarker.core.Expression.getStringValue(Expression.java:93) <br /> at freemarker.core.DollarVariable.accept(DollarVariable.java:76) <br /> at freemarker.core.Environment.visit(Environment.java:196) <br /> at freemarker.core.MixedContent.accept(MixedContent.java:92) <br /> at freemarker.core.Environment.visit(Environment.java:196) <br /> at freemarker.core.Environment.process(Environment.java:176) <br /> at freemarker.template.Template.process(Template.java:232) <br /> at net.jforum.JForum.processCommand(JForum.java:233) <br /> at net.jforum.JForum.service(JForum.java:200) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) <br /> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) <br /> at java.lang.Thread.run(Thread.java:619) <br /> <br /> URL is: /adminCache/list.page?null <br /> END ERROR STACK TRACE-->


This is continued in the cache page ---------------------------->


Expression session.userId is undefined on line 147, column 162 in default/header.htm.
The problematic instruction:
----------
==> ${session.userId} [on line 147, column 160 in default/header.htm]
in include "header.htm" [on line 1, column 1 in default/message.htm]
in include "${templateName}/message.htm" [on line 7, column 9 in exception.html]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression session.userId is undefined on line 147, column 162 in default/header.htm.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.renderElementToString(Environment.java:1461)
at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95)
at freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:80)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.ListLiteral.getModelList(ListLiteral.java:119)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:89)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.include(Environment.java:1375)
at freemarker.core.Include.accept(Include.java:155)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.include(Environment.java:1375)
at freemarker.core.Include.accept(Include.java:155)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:232)
at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:115)
at net.jforum.JForum.handleException(JForum.java:285)
at net.jforum.JForum.service(JForum.java:205)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

[originally posted on jforum.net by judekm]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The smilies are in the dump file - for example, WEB-INF/config/database/mysql/mysql_data_dump.sql (the same for other databases)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rafael,

Please click on http://javalive.com and click on a topic you will understand what I am trying to say.
Want to mention here that this used to work the first time I set it up. Please help its very critical as it is a live forum.

Jude
[originally posted on jforum.net by judekm]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, I understand, but there are smilies in the database or not? Take a look at the table jforum_smilies.

As a "fix" for that, open the file PostCommon.java, and in the line 267 you'll find the code which is causing problem. Before that line, there is a call to



which, for some reason, is null. A workaround would be to check for null before going to the for() loop:



That will prevent the exception. Now, we should discover why it is happening. If you have the smiles in the database, and if you reset the cache at Admin Panel -> Cache -> Smiles -> Reload, then a deeper debug is necessary.

For now, can you tell if the application is running on a single server or clustered environment?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right now it is running on a single VPS server.

Thanks,
Jude
[originally posted on jforum.net by judekm]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right then. So, it's hard to tell exactly why this is happening, as it always worked, and, as you said, it started out of the blue. Something (don't know what yet) is invalidating the smilies cache.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try out your solution and see what happens. By the way I would like to tell you that I had migrated the data from a xoops newbb forum to Jforum.

Thanks
Jude
[originally posted on jforum.net by judekm]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I populated the smilies table and it worked.

Jude
[originally posted on jforum.net by judekm]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic