Using the Apache Abdera example for converting an Entry to JSON I'm seeing
the following error:

Exception in thread "main" java.lang.NullPointerException
    at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:315)
    at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:793)

This happens in the call to: entry.writeTo("json", System.out);

Is this a known issue currently?

Source code I'm using:

import java.io.IOException;
import org.apache.abdera.Abdera;
import org.apache.abdera.model.Entry;

public class App
{
    public static void main( String[] args )
    {
        Abdera abdera = new Abdera();
        Entry entry = abdera.newEntry();
        entry.newId();
        entry.setTitle("test");
        entry.setContentAsHtml("<b>foo</b>");
        entry.addAuthor("James");
        entry.addCategory("term");

        try {
            entry.writeTo("json", System.out);
        }
        catch(IOException ioex) {
            System.out.println("IO Error: " + ioex.getMessage());
        }
    }
}

Reply via email to