Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-10-2006, 08:36 AM
Project Contributor
 
Posts: 88
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 08:39 AM..
Reply With Quote
  #2 (permalink)  
Old 04-10-2006, 08:41 AM
Zimbra Consultant & Moderator
 
Posts: 19,653
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.
__________________
Regards


Bill

Last edited by phoenix; 04-10-2006 at 08:55 AM..
Reply With Quote
  #3 (permalink)  
Old 04-10-2006, 10:42 AM
Project Contributor
 
Posts: 88
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 04:41 PM.. Reason: Added resolution steps
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.