Here is example restlet code that shows the fix in a restlet
application:
/**
* Creates a root Restlet that will receive all incoming calls.
*/
@Override
public synchronized Restlet createInboundRoot()
{
//
// When using GWT with appengine, we must override the
// default TransformerFactory because GWT writes an invalid
// default that causes an exception when trying to
// render a XML Representation. This masks the bug.
//
System.setProperty("javax.xml.transform.TransformerFactory",
"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
// Create a router Restlet that defines routes.
Router router = new Router(getContext());
//
// Defines a route for the resource "list of customer"
// the route is used to get the list of customers or
// to create a new customer.
//
router.attach("/service", ServiceResource.class);
return router;
}
On Jul 16, 9:13 am, emurmur <[email protected]> wrote:
> Thank you Shyam, I verified that this eliminates the server-side
> exception when using GWT, Appengine and Restlet together when using
> XML at the transport. However, I'm still a little worried. The
> reason the exception is thrown is because GWT itself writes this
> system property to something that it needs (see issue 4267) while
> running in the development server. By overwriting this value, we may
> be re-creating the issue that GWT intended to address by setting the
> property. So, we still need a real fix to issue 4267. Please go and
> star the issue
> at:http://code.google.com/p/google-web-toolkit/issues/detail?id=4267
>
> Thank you again Shyam.
>
> On Jul 16, 7:34 am, Shyam Visamsetty <[email protected]> wrote:
>
>
>
> > You should use this for creating XML transformations on App Engine.
>
> > System.setProperty("javax.xml.transform.TransformerFactory",
> >
> > "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
>
> > You definitely cant use this on the client side.
>
> > Thanks,
> > Shyam Visamsetty
>
> > On Jul 16, 12:20 am, Jan <[email protected]> wrote:
>
> > > No, it is definitely the server side where I'm trying this reflection.
> > > Anyway, thank's
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.