abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Marschall <kus...@gmx.net>
Subject Abdera on Google App Engine
Date Sat, 11 Apr 2009 14:53:46 GMT
Hi

I'm trying to use Abdera 0.4.0 on Google App Engine but it fails with
the following exception. However it runs fine on any other servlet
container. I'll be cross posting this to the App Engine mailing list.

java.lang.IllegalStateException: No valid ObjectCreator found.
	at org.apache.axiom.om.util.StAXUtils$Pool.<init>(StAXUtils.java:64)
	at org.apache.axiom.om.util.StAXUtils.<clinit>(StAXUtils.java:88)
	at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:408)
	at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:403)
	at org.apache.abdera.parser.stax.FOMWriter.writeTo(FOMWriter.java:77)
	at org.apache.abdera.util.AbstractWriter.writeTo(AbstractWriter.java:82)
	at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:368)
	at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:391)
	at
com.kenai.reminder.rest.DateTimeZoneWriter.writeTo(DateTimeZoneWriter.java:101)

The following code from axiom (1.2.5) seems to be the problem:

    private static final Pool xmlInputFactoryPool = new Pool(new
ObjectCreator[] {
            new ObjectCreator() {
                public Object newObject() {
                    return AccessController.doPrivileged(
                            new PrivilegedAction() {
                                public Object run() {
                                    Thread currentThread =
Thread.currentThread();
                                    ClassLoader savedClassLoader =
currentThread.getContextClassLoader();
                                    XMLInputFactory factory = null;
                                    try {

currentThread.setContextClassLoader(StAXUtils.class.getClassLoader());
                                        factory =
XMLInputFactory.newInstance();
                                    }
                                    finally {

currentThread.setContextClassLoader(savedClassLoader);
                                    }
                                    return factory;
                                }
                            });
                }
            },
            new ObjectCreator() {
                public Object newObject() {
                    return XMLInputFactory.newInstance();
                }
            }
    });


Cheers
Philippe

Mime
View raw message