Openarchive 1.0.5 retrieving chat history

Hello, I’m using openfire as my xmpp server, and I have the openarchive 1.0.5 plugin working that automatically saves the chats on the server… The problem I have is that I can’t find a way to retrieve these messages (from the client app) that are saved on the server , for this

I’m using PSI+ and I send an xml with the format specified in the “retrieving a collection” section of the XEP-0136, but the answer I’m getting from the server is “internal server-error”

So I wanted to know what I’m doing wrong or if that plugin doesn’t support the retrieving action of the chat history from the server to the client???

Thank you

Check your error logs, this plugin still works. Sounds like a setup issue.

Same problem

Log:

2011.10.04 10:04:44 [org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:69)] Internal server error

java.lang.NullPointerException

at com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager.getConversation( JdbcPersistenceManager.java:710)

at com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager.getConversation( JdbcPersistenceManager.java:667)

at com.reucon.openfire.plugin.archive.xep0136.IQRetrieveHandler.retrieve(IQRetriev eHandler.java:96)

at com.reucon.openfire.plugin.archive.xep0136.IQRetrieveHandler.handleIQ(IQRetriev eHandler.java:33)

at com.reucon.openfire.plugin.archive.xep0136.Xep0136Support$1.handleIQ(Xep0136Sup port.java:44)

at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:49)

at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:351)

at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:101)

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

at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:319)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler .java:79)

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

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

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

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.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)

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(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

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

at java.lang.Thread.run(Thread.java:636)

It works for me with MySQL and OfChat. Try a re-index

That issue will not be resolved via a reindex. You are hitting this line with the exception:

pstmt.setLong(3, dateToMillis(start));

Which means you are not providing a start time. I know Vacuum-IM supports 136, but I believe it does not send a start date.

Your IQ should look like:

<iq id="f9a817f"type=“get”>

<list xmlns="urn:xmpp:archive"with="exampleuser@example.com" start=“2011-08-16T01:33:24.592Z”><setxmlns=“http://jabber.org/protocol/rsm”>

5

Hi Raw,

I am also struglling with the same implementation, not able to retrieve archived chat messages at client hand.

I checked that messages are properly stored on server, but i am unable to prepare the exact code with smack library, to retrieve the chat messages from server.

Please help me at this point, how can i implement this feature with smack library in my android application.

Thanks.

Sumeet.

Hi Gabriel,

Can you please share that code with me, which used to get archived messages from xmpp server.

Thanks,

Sumeet.

XEP-0136 clearly tells you how to retrieve logged messages from an XMPP client.

Read it again, this time slowly.

If you are looking for source code on how to do it, take a look at OfChat with javascript at

http://code.google.com/p/openfire-websockets/source/browse/#svn%2Ftrunk%2Fsrc%2F ofchat%253Fstate%253Dclosed

You should be able to adapt that to Smack easily

HI,

First of all thanks to replying here.

I read XEP-0136 document very briefly, understand its basic concept, and tried too much time to implement it with smack library… but all the times either i am getting NULLPOINTEREXCEPTION or nothing returning as a response, when we are expecting to get archived messages.

I think there is a minor mistake done at my hand, so i am looking for exact code snippt, by which we can get archived message from server with the help of smack library.

I checked the project which you told, is totally build on java script, and i am fully illiterate in java script or any scripting languaging.

So if you can suggest any java language based project, then it will be benificial for me.

Any type of suggestion will definitely help me.

Thanks,

Sumeet.