powered by Jive Software

Can I disable logging of "JavaObject is not enabled"?

Hi there,

I have some client code which is successfully interacting with an XMPP chat room. I’m currently using smack-core, smack-extensions, and smack-tcp, all version 4.0.6, under Java 1.8.

However my customer is saying that lots of the following error logs are appearing in the Java console:

SEVERE [06:44:25 27-Oct-21 UTC][org.jivesoftware.smackx.jiveproperties.provider.JivePropertiesExtensionProvider] JavaObject is not enabled. Enable with JivePropertiesManager.setJavaObjectEnabled(true)

I can’t be sure but I reckon these errors are happening whenever my code is receiving an XMPP packet. Unfortunately, I have absolutely no control over what appears in those packets - they come from a third party piece of the overall solution.

That in itself is not a problem since the packets still seem to get processed correctly, but my customer - not wanting to enable Java Object - is wondering if there is anything I can do to simply change the XMPP logging level so that these errors don’t clutter up the console ? I don’t actually reference many of the Smack classes in my code - the main ones are:

import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.muc.DiscussionHistory;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smackx.ping.PingManager;

Can anyone help ?

java.util.logging (JUL, the logging facade used by Smack) allows for fine grained configuration. You could, for example, simply disable logs for JivePropertiesExtensionProvider.

Thanks - I had assumed that was possible, but just wondered if there was anything I could call directly in code, e.g. on the XMPPConfiguration ?

Yes, JUL exposes API for its configuration.