tags:

views:

795

answers:

1

Hi,

I have Openfire 3.6.3 installed on my server.

When it try to import users through admin panel its generating an error

The import file does not match the user schema.

My sample file is import.xml

  <?xml version="1.0" encoding="UTF-8" ?> 
  <Openfire>
   <User>
     <Username>xxxx</Username> 
     <Password>****</Password> 
     <Email>xxxx@myserver</Email> 
     <Name>aaa</Name> 
     <CreationDate>1241507639546</CreationDate> 
      <ModifiedDate>1241507639546</ModifiedDate> 
   <Roster>
   <Item jid="[email protected]" askstatus="-1" recvstatus="-1" substatus="2" name="user">
    <Group /> 
    </Item>
    </Roster>
    </User>
    </Openfire>

Please help me

Thanks

A: 

Create a user in the OpenFire admin console. Export the user list, then compare the resulting XML with the one that you have.

Here's a sample of how it should look:

<Openfire>
  <User>
    <Username>admin</Username>
    <Password>*****</Password>
    <Email>*****@gmail.com</Email>
    <Name>Administrator</Name>
    <CreationDate>1233673175062</CreationDate>
    <ModifiedDate>0</ModifiedDate>
    <Roster/>
  </User>
</Openfire>

I don't have the "roster" contents in my XML... Try removing it and then trying again.

EDIT

Your original post made no mention that you were trying to modify existing users, which is a totally different procedure.

Here's what I'd recommend:

  1. Export your current users
  2. Merge the two XML files. Any good file-diff utility should be able to do the trick.
  3. Delete all the users in the main system.
  4. Import the merged XML.
Computer Guru
Hi,Thanks for replying but i don't want to create a new user i want to add an item to the existing user.Please help
Pankaj Khurana
See my modified post above.
Computer Guru
Hi, ThanksI have created a user named test through admin panel(without any roster item).Now, when i try to import xml file with username which i have created along with some item jid i am getting the errorThe following users already exist in the system or have invalid username and were not loadedPls help
Pankaj Khurana
Hi, I just want to add some items to the roster of a particular user but not want to add new users.
Pankaj Khurana