• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caused by: java.lang.NullPointerException

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raphael,

I just updated my forum from 2.1.4 to 2.1.5 yesterday and it worked fine for a while, than after some time I got this error.

Today I installed the 2.1.6 and thaugth that will solve the problem, but it is still there. Works fine for some time and than after a while when I open the forum in a new browser I get this error.

What could that be?

<!-- BEGIN ERROR STACK TRACE <br /> java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:585) <br /> at net.jforum.Command.process(Command.java:116) <br /> at net.jforum.JForum.service(JForum.java:182) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) <br /> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) <br /> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) <br /> at java.lang.Thread.run(Thread.java:595) <br /> Caused by: java.lang.NullPointerException <br /> at net.jforum.repository.ForumRepository.getTotalMessages(ForumRepository.java:699) <br /> at net.jforum.repository.ForumRepository.getTotalMessages(ForumRepository.java:684) <br /> at net.jforum.view.forum.ForumAction.list(ForumAction.java:148) <br /> ... 24 more <br /> <br /> END ERROR STACK TRACE-->
[originally posted on jforum.net by marcinn]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, I turned off the cache and it does not happen anymore, I do not need the cache anyway. The cache would be useless when running on more than one server right? Changing a message in the cache would require changing it on the other server, or maybe it does work that way?

The second problem I have, is that I cannot send any e-mail with the new 2.1.6 version. I just installed a new empty forum. The installation went fine, everything was ok and then wenn I try to send the test e-mail, I get a message box "DWREngine._handleServerError is not a function" and no e-mail is sent. It has nothing to do with mail settings, because the same settings I use with the version 2.1.4 and it works. I use the new version only through the 8080 port so it shouldn't be a problem with Ajax. How can I get a more detailed error message? It did work with the 2.1.5 as I have had it for a while.

The good news is, that an e-mail is being sent when for example a new message is posted, so it is not a big problem for me.

best regards,

Marcin Nowacki
[originally posted on jforum.net by marcinn]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which cache you turned off?

The test email is already fixed in the cvs version. It was a problem with the Ajax library. A patch will be released soon.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I turned of the cache in the cache settings in the Configurations of the Admin Control Panel. Is there any other cache? If I would want to install JForum on more than one application server and one database server the cache should be turned of shouldn't it?

best regards,

Marcin
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JForum will not work accross multiple servers (in cluster) by default.

I'll try to reproduce the error and then fix it.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a lot of work involved to adapt it to a cluster environment?
Otherwise handling a big amount of users would require buying more powerfull (read a lot more expensive) server, and there is a limit at some point.

I have another point. At the moment no matter where I am, it will allways redirect to /forums/list.page after I log in or log out. Is there some place to configure it?
I looked into the code, and I believe one would have to modify the UserAction class, as it is there hardcoded. I do not know the JForum structure that well, but I suppose if we saved the latest request url in the session (except for the login and logout requests) one could be able to redirect to that page later on.

best regards,

Marcin

[originally posted on jforum.net by marcinn]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

marcinn wrote:Is there a lot of work involved to adapt it to a cluster environment?
Otherwise handling a big amount of users would require buying more powerfull (read a lot more expensive) server, and there is a limit at some point.



Well, no. If you get the CVS code (or even download the source code), you will have the JBossCacheEngine cache engine implementation, which solves the cluster problem.

However, we don't officially support it, basically because we need more people to help testing it. It should work fine, and where it fails, it should not be hard to fix the problem.

marcinn wrote:
I have another point. At the moment no matter where I am, it will allways redirect to /forums/list.page after I log in or log out. Is there some place to configure it?
I looked into the code, and I believe one would have to modify the UserAction class, as it is there hardcoded. I do not know the JForum structure that well, but I suppose if we saved the latest request url in the session (except for the login and logout requests) one could be able to redirect to that page later on.



You can pass a parameter named "returnPath" (via GET or POST, your choice), with the url you want to redirect to.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
reply
    Bookmark Topic Watch Topic
  • New Topic