Results 1 to 4 of 4

Thread: [SOLVED] Simplest ZMailbox example doest not work

  1. #1
    nickzm is offline Intermediate Member
    Join Date
    Apr 2011
    Posts
    15
    Rep Power
    4

    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?

  2. #2
    nickzm is offline Intermediate Member
    Join Date
    Apr 2011
    Posts
    15
    Rep Power
    4

    Default

    It is because of the incompatible xerces library. Resolved.

  3. #3
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    4

    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

  4. #4
    rpbarbati is offline Starter Member
    Join Date
    Mar 2014
    Posts
    2
    Rep Power
    1

    Default

    Since no one has given any zimbra specific information on setting the parser, here is a link to describing how to do it for Java in general.

    Databases and Life » Java: Always explicitly specify which XML parser to use

    Hope that helps.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Social zimlet some links don't work
    By bmw in forum Zimlets
    Replies: 0
    Last Post: 03-26-2011, 09:24 AM
  2. Replies: 0
    Last Post: 01-22-2008, 07:09 AM
  3. Replies: 42
    Last Post: 08-11-2006, 09:50 AM
  4. HELP- Making Zimbra work. after installation
    By hifriend1 in forum Installation
    Replies: 7
    Last Post: 04-05-2006, 06:43 AM
  5. "Must change password" still doest work
    By graffiti in forum Users
    Replies: 5
    Last Post: 12-05-2005, 09:00 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
  •