NullPointerException with MMSBufferAppender

  • Natsuki

    Natsuki - 2011-07-07

    I haven't been able to get this to work, so I tried the Example code which suffers from the exact same problem. Here is the example code:

    Logger log = LoggerFactory.getLogger();
    MMSBufferAppender mmsAppender = new MMSBufferAppender();
    // Yes, you could use the MMS protocol to send an e-mail.
    mmsAppender.addAddress("<real email here>");
    log.setLevel(Level.DEBUG);"Setup of log finished");
    log.debug("Message 1");
    log.debug("Testing a much longer message to see how it looks like.");
    log.error("This error message shall trigger sending an MMS message.");

    But this fails with an exception:
    Uncaught exception: java.lang.NullPointerException:   0
    at net.sf.microlog.midp.wma.MMSBufferAppender.sendLog(
    at net.sf.microlog.midp.wma.AbstractMessageAppender$
    at, bci=11

    Any ideas why?

  • Natsuki

    Natsuki - 2011-07-07

    Oh, and the error occurs on the final log.error line, in case that helps.


Log in to post a comment.