powered by Jive Software

Problem when changing the picture of vcard

when i change my personal picture, which is encoded as binary code?After send the vcard iq, value of my vcard stored in the database contain the illegal characters “&#0”. why this happens?And in following instance,:

1when the openfire and IM client set up in the same computer,

2 when i use the formerly version of openfire, wildfire

the phenomena i descriped does not happen.

why?

I have a server with currently 765 registered Users (aprox. 100 Users are simultaneous online over day).

With two of this users I had the described problem. In error.log I found the following errors:

2007.07.16 15:52:58 [org.jivesoftware.openfire.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProvider.java:81)] Error loading vCard of username: user.name
org.dom4j.DocumentException: Error on line 56 of document  : Character reference "&#0" is an invalid XML character. Nested exception: Character reference "&#0" is an invalid XML character.
(...)
Nested exception:
org.xml.sax.SAXParseException: Character reference "&#0" is an invalid XML character.
(...) 2007.07.16 15:52:58 [org.jivesoftware.openfire.vcard.DefaultVCardProvider.createVCard(DefaultVCardProvider.java:113)] Error creating vCard for username: user.name
java.sql.SQLException: Duplicate entry ''user.name'' for key 1
(...)

It seems not to be client dependent, because it happens with different clients. (Pidgin, Kopete, …)

It helps to delete the vcard entry in the database manually.

Coolcat

Hi,

can you send this picture to Gato / gaston@jivesoftware.com ? He may be very interested in a photo which breaks vCards so this problem can be fixed.

LG

In my test, most of jpg photos will lead to the phenomena happens. Sometims, need changing the picture for several times using the same photo.

Hi - I also get this same error. I change avatar using Spark and get the error message in the Openfire errorlog. I also get logged out when opening the “Edit my profile” window, and some other users seems to get logged out when I change avatar!

This happens with most images but not all. This image work, but this does not.

I use MySQL 4.1.20 database on a Fedora server. Openfire version 3.3.2 and Spark 2.5.6. I use LDAP authentication and have the LDAPvCardAvatar plugin (by Hannes) but the problem also occurs without the LDAPvCardAvatar plugin.

I use “latin1” codepage on the jiveVCard table and tried to change it to “ascii” and “cp850” but without success.

Note that “line 12” in the errormessage below is where the image is in the vCard XML.

2007.09.05 16:21:41 [org.jivesoftware.openfire.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProvider.java:81)] Error loading vCard of username: john.jarpe
org.dom4j.DocumentException: Error on line 12 of document : Character reference "?" is an invalid XML character. Nested exception: Character reference "?" is an invalid XML character.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at org.jivesoftware.openfire.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProvider.java:76)
at ch.eyecraft.openfire.plugin.LdapVCardAvatarProvider.loadAvatar(LdapVCardAvatarProvider.java:81)
at ch.eyecraft.openfire.plugin.LdapVCardAvatarProvider.loadVCard(LdapVCardAvatarProvider.java:57)
at org.jivesoftware.openfire.vcard.VCardManager.getOrLoadVCard(VCardManager.java:198)
at org.jivesoftware.openfire.vcard.VCardManager.getVCard(VCardManager.java:191)
at org.jivesoftware.openfire.handler.IQvCardHandler.handleIQ(IQvCardHandler.java:107)
at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:48)
at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:300)
at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:289)
at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler.java:79)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:254)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Nested exception:
org.xml.sax.SAXParseException: Character reference "?" is an invalid XML character.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanCharReferenceValue(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at org.jivesoftware.openfire.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProvider.java:76)
at ch.eyecraft.openfire.plugin.LdapVCardAvatarProvider.loadAvatar(LdapVCardAvatarProvider.java:81)
at ch.eyecraft.openfire.plugin.LdapVCardAvatarProvider.loadVCard(LdapVCardAvatarProvider.java:57)
at org.jivesoftware.openfire.vcard.VCardManager.getOrLoadVCard(VCardManager.java:198)
at org.jivesoftware.openfire.vcard.VCardManager.getVCard(VCardManager.java:191)
at org.jivesoftware.openfire.handler.IQvCardHandler.handleIQ(IQvCardHandler.java:107)
at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:48)
at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:300)
at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:289)
at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler.java:79)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:254)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)