Results 1 to 3 of 3

Thread: CSV Contact Import

  1. #1
    jonnyRo is offline Project Contributor
    Join Date
    Jan 2006
    Posts
    88
    Rep Power
    9

    Default CSV Contact Import

    Is there a particular format that the CSV Import depends on?

    One of my users has contacts that look like this,

    Full Name, e-mail
    ,e-mail


    When importing a Zimbra error message pops up. This is the text of the error:

    msg - system failure: java.lang.NullPointerException
    com.zimbra.cs.service.ServiceException: system failure: java.lang.NullPointerException
    at com.zimbra.cs.service.ServiceException.FAILURE(Ser viceException.java:131)
    at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:263)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:163)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:84)
    at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:228)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:154)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
    at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:526)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:825)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:738)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:526)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
    at com.zimbra.cs.mailbox.ContactCSV.initFields(Contac tCSV.java:440)
    at com.zimbra.cs.mailbox.ContactCSV.getContactsIntern al(ContactCSV.java:546)
    at com.zimbra.cs.mailbox.ContactCSV.getContacts(Conta ctCSV.java:571)
    at com.zimbra.cs.service.mail.ImportContacts.handle(I mportContacts.java:73)
    at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:252)
    ... 21 more

    code - service.FAILURE
    method - ZmCsfeCommand.prototype.invoke
    detail - soap:Receiver
    Last edited by jonnyRo; 04-10-2006 at 07:39 AM.

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,504
    Rep Power
    57

    Default

    You could export a test contact name and compare the layout with the one you're trying to import.

    I knew it was on the forum. Here's an example that KevinH did a while back.
    Last edited by phoenix; 04-10-2006 at 07:55 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    jonnyRo is offline Project Contributor
    Join Date
    Jan 2006
    Posts
    88
    Rep Power
    9

    Default Adjusting your CSV files for zimbra import

    Awesome, that was the component that I was missing, no header line.

    Steps.
    1. Export current empty contact list to file, call this headers.csv
    2. Export contact list from thunderbird as CSV file, call this contacts.csv
    3. Open up headers.csv in Openoffice 2.x
    4. Open up contacts.csv in another OpenOffice 2.x window
    5. Cut and paste all of contacts.csv under the first row of headers.csv
    6. Now you have a visible way to align the columns with the proper header. The easiest thing I found was to click on the column letter, then CTRL+Click on just the top row to select everything but the header name, then cut that whole column (minus the header) and move it over to the proper column.
    7. After ensuring that everything lines up, just "Save As" the headers.csv file as contacts_processed.csv
    8. Open up gedit to confirm that things look right.
    9. Open up user account from master account list using View Mail function
    10. Click on user preferences
    11. Click on Contacts tab
    12. Browse for your file and click import.

    It worked beautifully. 500 contacts imported no problem. The only thing that came up was that firefox kept thinking the script was running too long and asked me to stop it. Avoid stopping the script, it will take a long time with a long list of items to import.

    If you want to ditch those script timeouts, I posted some instructions on my blog Describing how to change the timeout duration
    Last edited by jonnyRo; 04-10-2006 at 03:41 PM. Reason: Added resolution steps

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 12
    Last Post: 06-13-2013, 08:55 AM
  2. Replies: 1
    Last Post: 07-27-2007, 12:19 PM
  3. Outlook Migration Wizard + Contact Groups
    By thegeekiator in forum Migration
    Replies: 4
    Last Post: 07-13-2007, 03:00 PM
  4. Can't import contact data to OTHER: Web Page?
    By gihrig in forum Administrators
    Replies: 0
    Last Post: 10-11-2006, 02:45 PM
  5. CSV import, some emails dropped
    By spork in forum Administrators
    Replies: 1
    Last Post: 05-05-2006, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •