powered by Jive Software

Error: object does not represent a valid JID

Hi all,

Today I found out about the awesome collaborative editor feature of NetBeans. I’m very excited because I’ve previously used SubEthaEdit and seen how useful it was for collaboratively editing a document.

After using the java.net collaborative server, I installed OpenFire 3.4.3 on my Ubuntu machine and got it up and running. I was able to add users remotely and SSL appeared to be working. However, all attempts to login (from NetBeans) fail! It seems to be a server-side problem… here is the ERROR log from OpenFire… has anyone seen this before?

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

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

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

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:173)

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$Worker.runTask(ThreadPoolExecutor.java: 885)

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

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

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

2008.01.04 13:06:13 org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManage rImpl.java:268) Error storing offline presence of user: samuel

java.sql.SQLException: Unique constraint violation: SYS_IDX_50 in statement

at org.hsqldb.jdbc.Util.throwError(Unknown Source)

at org.hsqldb.jdbc.jdbcPreparedStatement.execute(Unknown Source)

at org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManag erImpl.java:265)

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

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

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

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

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

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

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

at org.jivesoftware.openfire.nio.NIOConnection.notifyCloseListeners(NIOConnection. java:182)

at org.jivesoftware.openfire.nio.NIOConnection.close(NIOConnection.java:165)

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

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

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

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:173)

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$Worker.runTask(ThreadPoolExecutor.java: 885)

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

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

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

I got exactly the same problem! It’s something in conjunction with the HSQL database backend!

I get more or less the same exception even if I use the MySQL backend.

Since the back trace: "java.sql.SQLException: Unique constraint violation: SYS_IDX_50 in

statement [INSERT INTO jivePresence(username, offlinePresence,

offlineDate) VALUES(?,?,?)]" tells something about contraints, I think it should something with the jivePresence_pk? (see src/database/openfire_hsqldb.sql and src/java/org/jivesoftware/spi/PresenceManagerImpl.java ).

Abridgement of :

CREATE TABLE jivePresence (
username VARCHAR(64) NOT NULL,
offlinePresence LONGVARCHAR,
offlineDate VARCHAR(15) NOT NULL,
CONSTRAINT jivePresence_pk PRIMARY KEY (username)
);

Abridgement of :

private static final String INSERT_OFFLINE_PRESENCE =
“INSERT INTO jivePresence(username, offlinePresence, offlineDate) VALUES(?,?,?)”;

and

// Insert data into the database.
Connection con = null;
PreparedStatement pstmt = null;
try {
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(INSERT_OFFLINE_PRESENCE);
pstmt.setString(1, username);
if (offlinePresence != null) {
DbConnectionManager.setLargeTextField(pstmt, 2, offlinePresence);
}
else {
pstmt.setNull(2, Types.VARCHAR);
}
pstmt.setString(3, StringUtils.dateToMillis(offlinePresenceDate));
pstmt.execute();
}
catch (SQLException sqle) {
Log.error("Error storing offline presence of user: " + username, sqle);
}
finally {
DbConnectionManager.closeConnection(pstmt, con);
}

The username which is extracted from the packet is correct (see post of fommil). All other informations are read and written correctly (I can add users via the amdin consol, informations about my server instance are displayed correctly e.g.). What is the problem?

Could anybody help, solving this problem?

I’ve searched for an issue tracker for OpenFire, but I’m unable to find one… do we just hope an Ignite developer is reading this thread or have you found somewhere to file this?

Your are right. This stuff should be added to a bug tracker…

Oh the forum is the issue tracking system:

"Issue tracker

Use the official Ignite Realtime Issue Tracker to browse projects

and find issues. You may also vote for issues, see which issues are

popular, and view the road map. Note: to report new issues, please

post them in the forums."

Well found! that was hidden away. If you add it, I will vote for it and link to it from the NetBeans forum on this topic.

scratch that… just realised that we can’t add issues to the tracker.

Today I tried to connect to the openfire server via my IM Pidgin and it works! But I also need the XMPP server for collaboration issues!

What is the problem with the netbeans collaboration CMPP client?

so you’re saying you think this is a bug with NetBeans, not OpenFire?

I’m not sure! Since there is nobody who helps us, could we exchange some more information? Maybe we can locate and identify the cause of the problem.

I did all steps, which are descriped in “http://wiki.netbeans.info/wiki/view/CollabServer”. The openfire server runs on a FreeBSD machine. I installed openfire via ports, this ports instructed me to download the diable jdk… Since you are using Ubuntu, you are using the sun jdk, aren’t you? So the error is independent from the used jdk! You are using a mysql database. I’m using the hsql database backend. The database backend doesn’t seem to be the problem… We both using netbeans and we both using the newest version of OpenFire 3.4.3!

Some more information about login via Netbeans:

  • the admin console shows that the used account was loged in at the time I tried to login.
  • every time I’m trying to loggin the server produces the exception (see fommil’s first post)
  • netbeans shows the error message “Error: object does not represent a valid JID” (JID = Jabber ID?)

My Netbeans IDE Version:

Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.5.0_13; Java HotSpot™ 64-Bit Server VM 1.5.0_13-b05
System: Linux version 2.6.23-gentoo-r3 running on amd64; ISO-8859-15; de_DE (nb)

Any Idias? Maybe we should try another version of OpenFire… I don’t know how to identify the version of the Collab Modul … Oh, found it … Developber Collaboration Version 1.2 …

That’s a good summary… there is not much to add other than on the client side we have a combination of Intel OS X and Ubuntu 64 bit machines running the latest NetBeans 6.0 on their respective Java 1.5 SUN JDKs.

Yah, I got an answer from the collab.netbeans.org Mailing List. Zachary Benz told me that it is a known issue that OpenFire 3.4.x isn’t working with the collaboration of netbeans. We should use Openfire 3.3.x instead.

Thanks!

For you information, I got an answer here

http://blogs.sun.com/roumen/entry/using_developer_collaboration_behind_firewall# comments

that NetBeans 6.1 will fix the current issues.

According to “http://wiki.netbeans.org/wiki/view/NB61PerfPlan” the final release date for NetBeans IDE 6.1 is april the 21th.

org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManage rImpl.java:268)

Error storing offline presence of user: xxxxxxxx

java.sql.SQLException: Unique constraint violation: SYS_IDX_51 in

statement [INSERT INTO jivePresence(username, offlinePresence,

offlineDate) VALUES(?,?,?)]

at org.hsqldb.jdbc.Util.throwError(Unknown Source)

This error is still occurs in v1.3 on the netbeans 6.1 build, has the underlying schema changed?, are in active users not being cleaned out?

anyone got any ideas?

you can solve this: (Please add to faq) check this: - username must be in lowercase (on server and in collab login)
- change the domain to a name with a dot: mypc.org
- change the hostname at loginscreen also to: mypc.org so that the login goes to [user.name@mypc.org]
openfire domain setting: open admin console under localhost:9090
-> Server
-> Servermanager
-> System Properties
-> xmpp.domain
edit the domain to a domain with a dot

tried the solution that you have suggested, the domain was already in the format sungrid1.xxxxxxxxxx.com.au , tried username with and without the dot and stilll end up with the same error Thanks

local maschine responds to this domain?

check if you setup it in both?

maybe you need to restart the openfire server after changing the values? (i remember i miss this point after my first trials of changing the settings and i loose many hours)