Results 1 to 2 of 2

Thread: [SOLVED] error running ZimletHandler

  1. #1
    Join Date
    Jul 2006
    San Francisco, CA
    Rep Power

    Question [SOLVED] error running ZimletHandler

    After installing a zimlet I wrote, and despite the fact that it seems to be working correctly, I'm seeing a message like this in mailbox.log every time an email comes in:

    2008-08-15 17:17:20,106 INFO  [LmtpServer-228] [ip=;] lmtp - Delivering message: size=2440 bytes, nrcpts=1,, msgid=<2740.20080>
    2008-08-15 17:17:20,108 WARN  [LmtpServer-228] [;mid=10;] ParsedMessage - Unable to parse part 1 (, text/plain) of message with Message-ID <2740.20080815181706@wiia>.  Object will not be indexed.
    com.zimbra.cs.object.ObjectHandlerException: error running ZimletHandler net_milodev_tiny
        at com.zimbra.cs.object.ObjectHandler.parse(
        at com.zimbra.cs.mime.MimeHandler.getObjects(
        at com.zimbra.cs.mime.MimeHandler.getDocument(
        at com.zimbra.cs.mime.ParsedMessage.analyzePart(
        at com.zimbra.cs.mime.ParsedMessage.analyzeBodyParts(
        at com.zimbra.cs.mime.ParsedMessage.analyzeNonBodyParts(
        at com.zimbra.cs.mime.ParsedMessage.analyzeFully(
        at com.zimbra.cs.mailbox.Mailbox.addMessage(
        at com.zimbra.cs.mailbox.Mailbox.addMessage(
        at com.zimbra.cs.filter.ZimbraMailAdapter.addMessage(
        at com.zimbra.cs.filter.ZimbraMailAdapter.doDefaultFiling(
        at com.zimbra.cs.filter.ZimbraMailAdapter.executeActions(
        at org.apache.jsieve.SieveFactory.evaluate(
        at com.zimbra.cs.filter.RuleManager.applyRules(
        at com.zimbra.cs.lmtpserver.ZimbraLmtpBackend.deliverMessageToLocalMailboxes(
        at com.zimbra.cs.lmtpserver.ZimbraLmtpBackend.deliver(
        at com.zimbra.cs.lmtpserver.LmtpHandler.processMessageData(
        at com.zimbra.cs.lmtpserver.TcpLmtpHandler.continueDATA(
        at com.zimbra.cs.lmtpserver.LmtpHandler.doDATA(
        at com.zimbra.cs.lmtpserver.LmtpHandler.processCommand(
        at com.zimbra.cs.lmtpserver.TcpLmtpHandler.processCommand(
        at com.zimbra.cs.tcpserver.ProtocolHandler.processConnection(
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Source)
    Caused by: com.zimbra.cs.zimlet.ZimletException: null regex value
        at com.zimbra.cs.zimlet.ZimletException.ZIMLET_HANDLER_ERROR(
        at com.zimbra.cs.zimlet.handler.RegexHandler.match(
        at com.zimbra.cs.object.ObjectHandler.parse(
        ... 24 more
    The actual error varies slightly, but each time the "Caused by" message is the same - "com.zimbra.cs.zimlet.ZimletException: null regex value"

    The only two references to regexes in my code are in the zimlet definition xml file, here:
    <serverExtension hasKeyword="tinyurl" extensionClass="com.zimbra.cs.zimlet.handler.RegexHandler"/>
    <contentObject type="tinyurl">
        <regex attrs="ig">http:\/\/\/(\w{6})</regex>
    and the javascript file, here:
    Net_Milodev_Tiny.prototype._getHtmlContent =
    function(html, idx, obj, context) {
    	var escapedUrl = obj.replace(/\"/g, '\"');
    	if (escapedUrl.substr(0, 4) == 'www.') {
    		escapedUrl = "http://" + escapedUrl + "/";
    	html[idx++] = "<a target='_blank' href='";
    	html[idx++] = escapedUrl;
    	html[idx++] = "'>";
    	html[idx++] = AjxStringUtil.htmlEncode(obj);
    	html[idx++] = "</a>";
    	return idx;
    Sharp eyed observers will notice that I copied the last bit exactly from the com_zimbra_url zimlet, in order to get the tiny urls recognized to open in a new window, since I had to set the priority of this zimlet higher than the com_zimbra_url zimlet.

    In searching the forums, I found 2 threads that obliquely reference similar problems, with no solutions (here and here).

    Has anyone seen this before, or have an idea how to fix it? As I said, the zimlet appears to work correctly, but the errors are not exactly comforting.


  2. #2
    Join Date
    Jul 2006
    San Francisco, CA
    Rep Power


    After talking to a Zimbra engineer, I was told that this error stemmed from not setting a ZIMLET_CONFIG_REGEX_VALUE in the globalConfig section in the config.xml file, while having the serverExtension element in the net_milodev_tiny.xml file.

Posting Permissions

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