querying openfire message archive - openfire

I'm playing around with strophe and Openfire 3.7.1 (with user-service and monitoring plugin).
I've read in http://xmpp.org/extensions/xep-0136.html (7.2 Retrieving a Collection)
that I could retrieve archived messages. I've installed the monitoring.jar plugin to my openfire server and I enabled archiving. I've read that I need open archiving to query archives, but this functionality is already in Monitoring plugin.
to quote Monitoring Plugin Readme:
"The monitoring plugin adds support for chat archiving and server statistics to Openfire. It provides support for generating various reports on the server statistics, as well as managing, viewing, and reporting on chat logs."
I can see the archived messages in the monitoring GUI but I want to retrieve it in my client which I made using strophe.js library. I'm not sure how to do it.
In the XEP-0136 example they created a IQ like this:
<iq type='get' xmlns='jabber:client'><retrieve xmlns='urn:xmpp:archive' with='test#localhost'>set</retrieve></iq> { nodeTree=iq, node=retrieve}
However openfire does not seem to reply. I'm not sure if I should use open archive plugin since if I check my monitoring tab the archives are already there.Moreover most of the posts concerning open archive are 2 years old so I'm not sure if it is still supported. Please advice.
Best Regards,
Stevenson Lee

should be like this
<iq type='get' id='juliet1'>
<list xmlns='urn:xmpp:archive'
with='juliet#capulet.com/chamber'>
</list>
</iq>
<iq type='get' id='page1'>
<retrieve xmlns='urn:xmpp:archive'
with='juliet#capulet.com/chamber>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>100</max>
</set>
</retrieve>
</iq>
or did you do something else

I was able to get it working. I basically had to setup the server and test it with a xep-0136 compliant client(vacuum im). I had some mistakes with my IQ request which cause the server-error. The proper request should be initially a list request to get the list of chat. and a retrieve request to get specific conversation details. hope it helps people who are having the same problems. vacuum has an awesome xml console that showed me what i need I suggest using it. I did have problems building it. But i was able to build and run the src i got from their svn(http://code.google.com/p/vacuum-im/source/checkout)

Related

Purpose of localConnector-1.0 feature in Websphere server with IntelliJ

I was following a tutorial for setting up a WebSphere Liberty Server Here and didn't really know what a part of the tutorial did. I completed the tutorial and it works fine.
On step 3 it has me modify the server.xml with these two lines and I dont really know what they do.
<applicationMonitor updateTrigger="mbean" />
<feature>localConnector-1.0</feature>
I Found the documentation for localConnector-1.0 but its a little over my head
https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.liberty.autogen.nd.doc/ae/rwlp_feature_localConnector-1.0.html
I think localConnector allows IntelliJ to run the server somehow but i dont know what updateTrigger="mbean" does.
If anyone has an explanation that would be great. Thanks!
The localConnector-1.0 feature enables the local JMX connector on Liberty so that the JMX Client (IntelliJ) can connect to and administer Liberty.
You can find more documentation on the feature here: https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_admin_localconnector.html
updateTrigger="mbean" is setting the application updates to only occur when trigger by an mbean call (whereas the default is to poll for changes).
You can find more documentation here:
https://www.ibm.com/support/knowledgecenter/SSAW57_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_setup_dyn_upd.html

Debugging Parse Cloud-Code

What would be the best way to debug Parse Cloud Code? Currently it's a mess of logging to the console and checking logs. Does anyone have a good workable solution?
During development, you should begin by testing against a local hosted server. I.e., I use VS Code. You can set breakpoints and watch variables for their values. You can set up a tool like ngrok to get a remote URL for your local endpoint so you can test with non-local hosted clients if you'd like.
We also use Slack extensively. We've created our own slack bot, and it has several channels it reports relevant information too, triggered from our parse-server. One of these is a dev error channel. Instead of console.logs, which are hard to sift through and find what you're looking for, we push important information to Slack. We don't switch every single console.log to a slack message, just the important "Hey something went wrong here's the information" messages. This brings them to our attention so we can identify and resolve them way faster. Slack is awesome. I recommend using slack, even on a solo project.
at the moment you can access your Logs using a console.log() or console.error() for functions and all general logs of everything that happens with your app, at Back4App you can access using: Server Settings -> Logs -> Settings -> Server System Log.
Or functions and all logs generated by Parse server, they're: request.log.info() and request.log.error(), at Back4App you can access using: Dashboard -> Logs.

re-configuring a worklight application with analytics

After redeploying a worklight application, some configuration for analytics got lost and I'm trying to configure worklight with analytics again.
The dashboard shows "No data available" for time after the deployment although there are old records displayed for the time before the deployment of the application. So the db was not affected.
I set the wl.analytics.logs.forward property to "true" in worklight.properties;
also I set the wl.analytics.url of the db to be something like:
https://myserver:port/analytics/data
The dashboard is on
https://myserver:port/analytics/console
That is the URL for the analytics server.
Although if I put the db URL in a browser I get something like:
Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /data
Checked SystemOut.log and SystemErr.log (WAS logs) and I did not see errors there.
Does anybody know which is the XML I need to check in order to validate the configuration is OK for analytics? How could I troubleshoot this problem? Are there other logs I could check?
In the list of environment variables you gave I do not see any for username and password. Try to set:
wl.analytics.password=admin
wl.analytics.username=admin
It would be useful to see a wireshark trace, maybe you are not getting 403s. The Analytics data uploader generally has a small bit of protections and you have the option to keep or remove it.
#patbarron is correct about the multiple WAR files though. You need to send your analytics data to the /analytics-service context. The WAR analytics-service is the WAR that handles all the data processing, querying, etc. The other WAR analytics just handles the console UI.
When testing it might be beneficial to lower the
wl.analytics.queue and wl.analytics.queue.size, those values are for collecting data on the MobileFirst runtime server. Data is collected at the runtime server then sent to the analytics server. The larger these values are generally, the longer it will take to send. There are good to set for production

activemq where is the destinations tag?

I am reading this book "Activemq In Action". In the section (appendix D) where they are trying to configure the activemq, it is mentioned that
<destinations>
<topic name="topic1" physicalName="jms.topic1"/>
</destinations?
But I can't locate any tags containing "destinations" in the file activemq.xml. I tried both the versions 5.4.3 (as the version 5.2.0 used in the book could not be downloaded) and the latest version 5.9.0. None have any section containing destinations tag. Now if I want to run the examples in the book (like the chat application), how can I configure the activemq?
Thanks
an ActiveMQ server will create any topic or queue that receives a message if it doesn't exist already. You dont need to create them previously, just run the server, send the message and that's all.
I haven't read the book but I think you don't need to find that file (i couldn't find it in my server either) in order to run any sample app pointing to an ActiveMQ server.

XPages JVM Error: err.PersistenceServiceResourceProvider.Errorwritingtopersistedcontenttor

We are running a Domino 8.5.3 and the server log is constantly issuing these errors:
HTTP JVM:
!err.PersistenceServiceResourceProvider.Errorwritingtopersistedcontenttor!
We have not been able to isloate it to a particular page. Eventually, the HTTP task will crash and we need to reboot the server and recompile all the databases on the server. We are using the CKEditor to generate the HTML content. You help would be most appreciated.
We used to get this exact error a lot which appeared to be caused by inline images uploaded via the CKEditor like Paul mentioned.
I don't know why but we fixed it by changing the directory domino uses for uploads via the
xsp property xsp.persistence.dir.xspupload (formally xsp.upload.directory)
changing it to something like c:\temp rather than the windows default made the problem go away. could have been a co-incidence but may have been something in windows interfering
I haven't seen that error before but it reads like it might be something to do with asking the server to make a lot of data available to the xpages between calls to the server- effectively, session and application scope data.