RE: NPE when using WADL extension auto transform to HTML feature
I'm having this same issue: just trying to retrieve url/method=OPTIONS on my WadlApplication derivative gives the following: SEVERE: An exception occured writing the response entity java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:642) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251) at org.restlet.ext.xml.TransformRepresentation.transform(TransformRepresentation.java:572) at org.restlet.ext.xml.TransformRepresentation.write(TransformRepresentation.java:589) at org.restlet.ext.xml.TransformRepresentation.write(TransformRepresentation.java:599) at org.restlet.representation.CharacterRepresentation.write(CharacterRepresentation.java:76) at org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:509) at org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:453) at org.restlet.ext.servlet.internal.ServletCall.sendResponse(ServletCall.java:459) Requesting JSON works fine, of course. Like Paul, I have xalan 2.7.1 (Maven dependency). This is the GAE edition, if it matters. Help! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3019365
RE: Problem with CookieAuthenticator
I am having the same problem as the original poster, and have been able to get CookieAuthenticator to work. Has this problem been solved? It sounds like the implementation may be incomplete. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3026801
RE: Re: Problem with CookieAuthenticator
Oh, drat. Sorry for the confusion, but I meant to write ... and have NOT been able to get CookieAuthenticator to work. Sorry if I got anyone's hopes up... Jon -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3027643
Intermittent Communication Error (1001) with Restlet 2.1.1
I'm seeing the following stack trace from my Restlet 2.1.1 client application when talking to my Restlet 2.1.1 server running on the GAE SDK development server. It is intermittent (sometimes the client app runs to completion), and happens on different calls. Exception in thread main Communication Error (1001) - The connector failed to complete the communication with the server at org.restlet.resource.ClientResource.doError(ClientResource.java:612) at org.restlet.resource.ClientResource.handleInbound(ClientResource.java:1202) at org.restlet.resource.ClientResource.handle(ClientResource.java:1026) at org.restlet.resource.ClientResource.post(ClientResource.java:1418) at com.cm.interchange.cli.Preload.main(Preload.java:171) Caused by: java.net.SocketException: Socket Closed at java.net.PlainSocketImpl.getOption(PlainSocketImpl.java:286) at java.net.Socket.getSoTimeout(Socket.java:1032) at sun.net.www.http.HttpClient.available(HttpClient.java:356) at sun.net.www.http.HttpClient.New(HttpClient.java:273) at sun.net.www.http.HttpClient.New(HttpClient.java:310) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:987) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841) at org.restlet.ext.net.internal.HttpUrlConnectionCall.sendRequest(HttpUrlConnectionCall.java:334) at org.restlet.engine.adapter.ClientAdapter.commit(ClientAdapter.java:114) at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:112) at org.restlet.Client.handle(Client.java:180) at org.restlet.routing.Filter.doHandle(Filter.java:159) at org.restlet.routing.Filter.handle(Filter.java:206) at org.restlet.resource.ClientResource.handle(ClientResource.java:1136) at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1225) at org.restlet.resource.ClientResource.handle(ClientResource.java:1025) ... 2 more When I crank logging up to FINEST, this is the end of the server stdout: Feb 12, 2013 8:07:46 AM com.google.appengine.api.datastore.dev.LocalDatastoreService commitImpl FINE: committed: 1 puts, 0 deletes in 1 entity groups Feb 12, 2013 8:07:46 AM com.cm.interchange.service.NotifyImpl sendEvent INFO: Item created: /car/61 Feb 12, 2013 8:07:46 AM com.google.appengine.api.channel.dev.ChannelManager sendMessage WARNING: Skipping message to unconnected channel: asdf Feb 12, 2013 8:07:46 AM org.restlet.service.ConverterService toRepresentation FINE: Converter selected for OfyCar: JacksonConverter Feb 12, 2013 8:07:46 AM org.restlet.engine.log.LogFilter afterHandle INFO: 2013-02-1201:07:46127.0.0.1 127.0.0.1 8080POST/api/car-201 - 222 126 http://localhost:8080 Restlet-Framework/2.1.1 - Feb 12, 2013 8:07:46 AM com.google.apphosting.utils.jetty.JettyLogger debug FINE: EOF Feb 12, 2013 8:07:46 AM com.google.apphosting.utils.jetty.JettyLogger debug FINE: EOF Feb 12, 2013 8:08:03 AM com.google.appengine.api.datastore.dev.LocalDatastoreService$PersistDatastore persist INFO: Time to persist datastore: 20 ms The last INFO message comes out a second or two after the client crashes. The two JettyLogger debug FINE EOF messages are consistently the last messages when the client crashes. Note that the server doesn't crash; it continues running. Versions: Restlet: 2.1.1 GAE SDK: 1.7.4 Java: Oracle Hotspot 64-bit 1.6.0_39 Objectify: 3.1 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3048437
RE: Re: @Post not handling multiple variants properly?
Thank you, Thierry. I added a comment to the ticket describing my workaround (though it's probably obvious). -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3049873
RE: Intermittent Communication Error (1001) with Restlet 2.1.1
Any ideas on this? I have not seen this when running against appspot.com, only the development server. Is the dev server running out of some resource, such as sockets? I am opening 8 simultaneous ClientResource instances in the client app, although it is single threaded (only one request outstanding at a time). Is this a bad idea? Forgot to mention in my original posting that I'm developing on CentOS 6.3. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3049874
@Post et. al. need Javadoc updates
It appears that the ability to do @Post(?queryparam) has not been added to the Javadoc for the annotations. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3050702
RE: Intermittent Communication Error (1001) with Restlet 2.1.1
No, I have not. My work has taken me away from my task on which this problem occurs, but it still exists. Any comments from the Restlet folks? Any hints on how to diagnose this further? What additional information could we post to help you help us? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053162
RE: catching JSON parse errors
So, I may be missing the obvious, but if the method's precondition is that it receives an int[], shouldn't you be doing input validation anyway? if (userData instanceof int[] ((int[]) userData.length 0) { return userData; } else { getResponse().setStatus(Status.BAD_REQUEST); } Or are you looking for an out-of-band solution for many such handlers? If the latter, you probably could implement your own derivation of Restlet Filter does the above check, and plumb your Filter derivative upstream from your Resource. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054621