powered by Jive Software

Openfire reports Invalid State, the Connection object is closed

hi we are using openfire 3.7.0 and have tied our Openfire to a SQL Server 2005 hosted on another machine. We do have constant interruptions to our database server and it gets rebooted quite frequently. We have been experiecning this problem which basically kills out database connection and hence our roster is empty until the openfire server is restarted and then everything is back to normal. We are using the jtds driver . Not sure if it is a issue with the driver or something else whcih we can do to prevent this.

2013.01.20 10:59:18 Invalid state, the Connection object is closed.

java.sql.SQLException: Invalid state, the Connection object is closed.

at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1634)

at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java :2328)

at org.jivesoftware.openfire.group.DefaultGroupProvider.getMembers(DefaultGroupPro vider.java:732)

at org.jivesoftware.openfire.group.DefaultGroupProvider.getGroup(DefaultGroupProvi der.java:280)

at org.jivesoftware.openfire.group.GroupManager.getGroup(GroupManager.java:294)

at org.jivesoftware.openfire.group.GroupManager.getGroup(GroupManager.java:273)

at org.jivesoftware.openfire.group.GroupCollection$UserIterator.getNextElement(Gro upCollection.java:113)

at org.jivesoftware.openfire.group.GroupCollection$UserIterator.hasNext(GroupColle ction.java:76)

at org.jivesoftware.openfire.roster.RosterManager.getSharedGroups(RosterManager.ja va:170)

at org.jivesoftware.openfire.roster.Roster.(Roster.java:127)

at org.jivesoftware.openfire.roster.RosterManager.getRoster(RosterManager.java:94)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUpdate(Presenc eUpdateHandler.java:305)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:160)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:135)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:199)

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:149)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:85)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:84)

at org.jivesoftware.openfire.SessionManager.removeSession(SessionManager.java:1101 )

at org.jivesoftware.openfire.SessionManager.removeSession(SessionManager.java:1054 )

at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClos e(SessionManager.java:1169)

at org.jivesoftware.openfire.net.VirtualConnection.notifyCloseListeners(VirtualCon nection.java:214)

at org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:19 0)

at org.jivesoftware.openfire.session.LocalSession.close(LocalSession.java:322)

at org.jivesoftware.openfire.multiplex.ConnectionMultiplexerManager.closeClientSes sion(ConnectionMultiplexerManager.java:192)

at org.jivesoftware.openfire.multiplex.MultiplexerPacketHandler.handle(Multiplexer PacketHandler.java:113)

at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processIQ(MultiplexerSta nzaHandler.java:67)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:302)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:194)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:169)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Unknown Source)