powered by Jive Software

VCardProvider

Hi Folks,

i try to create my own VCardProvider to reflect the allready existing

information of the community-users in the vcard.

That´s what I did:

/**

  • $RCSfile$

  • $Revision: 1759 $

  • $Date: 2005-08-09 19:32:51 -0300 (Tue, 09 Aug 2005) $

  • Copyright © 2004 Jive Software. All rights reserved.
  • This software is published under the terms of the GNU Public License (GPL),

  • a copy of which is included in this distribution.

*/

package org.jivesoftware.messenger.vcard;

import org.dom4j.Element;

import org.dom4j.io.SAXReader;

import org.jivesoftware.database.DbConnectionManager;

import org.jivesoftware.util.AlreadyExistsException;

import org.jivesoftware.util.Log;

import org.jivesoftware.util.NotFoundException;

import java.io.StringReader;

import java.sql.Connection;

import java.sql.PreparedStatement;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.util.concurrent.BlockingQueue;

import java.util.concurrent.LinkedBlockingQueue;

/**

  • Default implementation of the VCardProvider interface, which reads and writes data

  • from the jiveVCard database table.

  • @author Gaston Dombiak

*/

public class LSVCardProvider extends DefaultVCardProvider {

private BlockingQueue

Message was edited by:

JC_Heyer

Message was edited by:

JC_Heyer

Hey JC Heyer,

The server will look for in the jive-messenger.xml file located in the conf folder. It seems that you were missing the provider element in your configuration.

Regards,

– Gato

Read my first posting, I add the provider in the xml-file and it is the correct file.

JC

Ok. Have you checked if you are using the correct “element path”? In your post you said that you were using . Let me know if that was the problem.

Regards,

– Gato

As I allready posted, its in the provider-section.

I also user a customized auth and user provider. They both work perfectly.

The funny thing is, even if I use a non-existing provider, jive does NOT complain about a missing provider. But it IS the right XML-File.

Best Regards

JC

eeerrrrr, are the customized providers disabled when I use the internal DB ?

I added this to the VCardManager :


 static {
 // Load a VCard provider.
 System.out.println("Drin lese XML-Config");
 String className = JiveGlobals.getXMLProperty("provider.vcard.className",
 DefaultVCardProvider.class.getName());
 try {
 System.out.println("trying to use vcard provider " + className);
 Class c = ClassUtils.forName(className);
 provider = (VCardProvider)c.newInstance();
 }
 catch (Exception e) {
 Log.error("Error loading vcard provider: " + className, e);
 provider = new DefaultVCardProvider();
 }
 }

but the system.out.println things never show up…

Hmmmmmmmm

JC

Aaaaaarghhhhhh

The Providersection is by default just below the LDAP section which is commented out by default…

Shame on me

Cheers

JC

Hey JC,

Glad to hear that it’'s working fine. Sorry for the confusion.

Regards,

– Gato

Sorry to be blind

Cheers

JC

Gato,

I am attempting to get the vcard via LDAP (active directory), I have inserted the vcard mappings between the " class is the true for AD ldap?

If so what is the syntax?

thanks

jason

/code

Excellent – Thanks