Open Archive Issue

When reading the logs the conversations are not always threaded. Is there a reason for this behavior? See samples below.

Threaded:

Un-threaded:

The reason for this is a bug in Open Archive but though I also see this behavior for a few of my own conversations I have not yet been able to reproduce it.

Did you observe anything that could help me reproduce this? any “special” circumstances in which this happens?

Hi Guys…

in my case i’m getting two issues types. One of then is the same reported by “mtstravel”. The another one happens when i choose one of the registers at the list. Always one of this two issues happen when i choose one of the registers at the list.

I’m using Openfire 3.3.2 and the version 1.0.3 of the OpenArchive plugin.

Thanks.

Kleber.

Ooppss… i forgot to say one important thing: i’m using PostGreSQL 8.1.9-1. The DataBase schema used is based on the attached script. I think that the script is ok, but could be something with PostGreSQL (particularly with the second issue – error message)??

Thanks again…

Kleber.

There is a simple patch for this Problem.

  • ./archive/com/reucon/openfire/plugin/archive/impl/JdbcPersistenceManager.java 2007-06-28 19:17:10.000000000 +0200

+++ ./archive_new/src/main/java/com/reucon/openfire/plugin/archive/impl/JdbcPersist enceManager.java 2007-09-24 16:31:59.000000000 +0200

@@ -791,7 +791,8 @@

final long id;

id = rs.getLong(1);

  • message = new ArchivedMessage(millisToDate(rs.getLong(2)), ArchivedMessage.Direction.valueOf(rs.getString(3)),
  •    //Log.error("--" + rs.getLong(2) + "-" + rs.getString(3) + "-" + rs.getString(4));
    
  •    message = new ArchivedMessage(millisToDate(rs.getLong(2)), ArchivedMessage.Direction.valueOf(rs.getString(3).trim()),
    

rs.getString(4));

message.setId(id);

message.setSubject(rs.getString(5));

Ok so am I to assume that I am supposed to replace some of the code in the original file with the code you provided in the patch?

Hello,

the insert with the enum is the problem with the Postgresql.

The enum contains whitespaces at the end of the sql statement.

The patch didn’t solve this problem, because it removes the whitespaces only at the query and not at the insert.

I think the problem is the prepareStatement function.

I get the other error as well if I try to type anything in the search fields. I use the embeded database.

Hm and where does that space come from on PostgreSQL? This looks like a bug in the JDBC driver…

pstmt.setString(3, message.getDirection().toString());

Thats the part of the insert. toString() evaluates to either “to” or “from” without any whitespace.