Hello, i got problems that the plugin sometimes does not recognise the correct namespace for MAM:2
on IQQueryHandler.java arround line 363 findMessages is called with parameter this.usesUniqueAndStableIDs():
Collection <ArchivedMessage> result = getPersistenceManager(queryRequest.getArchive()).findMessages(
startDate,
endDate,
queryRequest.getArchive().toBareJID(),
withField,
queryRequest.getResultSet(),
this.usesUniqueAndStableIDs());
for MAM:2 this.usesUniqueAndStableIDs() should return true, but it often returns false so that i will get an exception:
java.lang.NumberFormatException: For input string: "64aa563b-8863-43a8-a391-bd260285ac3a"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_202]
at java.lang.Long.parseLong(Long.java:589) ~[?:1.8.0_202]
at java.lang.Long.parseLong(Long.java:631) ~[?:1.8.0_202]
at com.reucon.openfire.plugin.archive.impl.MucMamPersistenceManager.parseIdentifier(MucMamPersistenceManager.java:239) ~[?:?]
at com.reucon.openfire.plugin.archive.impl.MucMamPersistenceManager.findMessages(MucMamPersistenceManager.java:96) ~[?:?]
at com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler.retrieveMessages(IQQueryHandler.java:359) ~[?:?]
at com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler.lambda$handleIQ$0(IQQueryHandler.java:205) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_202]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_202]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
i assume that the namespace is not read correctly
i tested it with adding a further field namespace to class QueryRequest, read it out in constructor
with this.namespace = queryElement.getNamespaceURI(); and read it before call findMessages:
String namespace = queryRequest.getNamespace();
Log.info(“NAMESPACE=”+namespace);
I think the object is not an instance of IQQueryHandler2.
So the request is not correctly parsed and routed to the right handler?