This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JForum and the fly likes NPE when looking up forums or categories Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "NPE when looking up forums or categories" Watch "NPE when looking up forums or categories" New topic
Author

NPE when looking up forums or categories

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
We have JForum installed on a WebSphere, and since a number of days the forum has started to behave badly:
* slow response at first
* after some time, no response at all

Looking at the output of the server console, we see the following errors appear:

Caused by: java.lang.NullPointerException
at net.jforum.entities.Category.getForum(Category.java:291)
at net.jforum.repository.ForumRepository.getForum(ForumRepository.java:419)
at net.jforum.view.forum.RSSAction.forumTopics(RSSAction.java:106)
... 38 more

Could this indicate that our database is corrupt ? Is there a way to know more about when the NPE was generated ? debug logging ?
[originally posted on jforum.net by alidan]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Things are getting worse: no there is the following exception when trying to open a first session:

[7/16/07 12:22:30:581 CEST] 00000028 SystemOut O 12:22:30,580 ERROR [ExceptionWriter ] net.jforum.exceptions.DatabaseException: java.sql.SQLException: Column not found: user_notify_always
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcResultSet.findColumn(Unknown Source)
at org.hsqldb.jdbc.jdbcResultSet.getInt(Unknown Source)
at net.jforum.dao.generic.GenericUserDAO.fillUserFromResultSet(GenericUserDAO.java:200)
at net.jforum.dao.generic.GenericUserDAO.selectById(GenericUserDAO.java:105)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:94)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:112)
at net.jforum.JForum.service(JForum.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3163)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:100)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: java.sql.SQLException: Column not found: user_notify_always
... 39 more

So it's clearly a problem of a corrupted database. The hsqldb
What is the way out of this (except returning to a former backup and loosing more recent data) ?
[originally posted on jforum.net by alidan]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Did you upgrade from an older version of JForum? this looks like a forgotten sql update script.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
wood burning stoves
 
subject: NPE when looking up forums or categories