I'm not familiar with google's environment but this tells me that it's not 
seeing the stax config correctly and isn't initing that stuff properly. I would 
remove abdera from the mix and see if you can just get an app using stax up and 
running first and debug from there. 

- James

------Original Message------
From: Philippe Marschall
To: [email protected]
ReplyTo: [email protected]
Subject: Abdera on Google App Engine
Sent: Apr 11, 2009 7:53 AM

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


Sent from my Verizon Wireless BlackBerry

Reply via email to