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

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-24-2011, 03:21 AM
Intermediate Member
 
Posts: 15
Default [SOLVED] Simplest ZMailbox example doest not work

Code:
		try {
			ZMailbox client = ZMailbox.getByName("admin", "notapass", "http://server/service/soap/");
			ZAuthToken t = client.getAuthToken();
			System.out.println(t.toString());
			List<ZFolder> folders = client.getAllFolders();
			for(ZFolder f : folders){
				System.out.println("folder:"+f.getName());
			}
		} catch (ServiceException e) {
			e.printStackTrace();
		}
Above code always throws an exception as following:
Code:
Unable to determine platform because \opt\zimbra\.platform does not exist.
Exception in thread "main" java.lang.UnsupportedOperationException: This DocumentBuilder, "org.apache.xerces.jaxp.DocumentBuilderImpl", does not support the reset functionality.  Specification "null" version "null"
	at javax.xml.parsers.DocumentBuilder.reset(DocumentBuilder.java:92)
	at com.zimbra.common.soap.Element.toW3cDom(Element.java:387)
	at com.zimbra.soap.JaxbUtil.elementToJaxb(JaxbUtil.java:138)
	at com.zimbra.cs.zclient.ZMailbox.invokeJaxb(ZMailbox.java:551)
	at com.zimbra.cs.zclient.ZMailbox.authByPassword(ZMailbox.java:496)
	at com.zimbra.cs.zclient.ZMailbox.<init>(ZMailbox.java:411)
	at com.zimbra.cs.zclient.ZMailbox.getByName(ZMailbox.java:370)
Can anyone tell me why?
Reply With Quote
  #2 (permalink)  
Old 04-24-2011, 05:41 AM
Intermediate Member
 
Posts: 15
Default

It is because of the incompatible xerces library. Resolved.
Reply With Quote
  #3 (permalink)  
Old 06-20-2011, 10:03 AM
Intermediate Member
 
Posts: 17
Default

Quote:
Originally Posted by nickzm View Post
It is because of the incompatible xerces library. Resolved.
Hello,
I have the same problem :

Code:
String serverURL = "http://zimbra.server.com" + AccountConstants.USER_SERVICE_URI;
			ZMailbox mailbox = ZMailbox.getByName(user, password, serverURL);
			mailbox.getAllFolders();
How did you resolve it ???
__________________
Marouane
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.