RE: Re: POST Requests return with a 405 with @Post annotated method
Hello Alex, Peter, I've tested with the current trunk (2.1) and the firstResource works for me. Regarding the 2.0 release (in its own branch), the current code in svn works too, which is not the case of the 2.0.1. I think we will release a 2.0.2 soon having the bug fix. This week-end should be a good idea. Regarding the build process, it works using the ant scripts (even if the tests are take a lot of time). I must test with maven, and I'm convinced there is a problem with the libraries such as bloat, that are hosted in this restlet repository. Regarding the public Maven repository, snapshots of both 2.0 and 2.1 releases are available (version = 2.0-SNAPSHOT and 2.1-SNAPSHOT, in date of october, 15th). It must contain the bug fix. Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2674372
Re: POST Requests return with a 405 with @Post annotated method
hi Thierry, my thought was, that ANT is capable in building things out of templates, so I can choose which edition to build in that properties file. As far as I know, there is no such mechanism in maven. Every maven project will have exactly one groupId, there is no (easy) way to persuade maven to build several editions from more or less the same code. Of course it is possible to set maven dependencies to different editions. But back to our original topic: I found out, that everything works well, when I use @Post- Annotation instead of @Post(json). Of course I have to change the method's return type to String if I do so. When I use the JsonConverter, the problem (Method not allowed) came up. During my tests I got the feeling, that inheritance (so if the annotated method is in a parent class of the actual restlet) didn't work well, but I can not validate that feeling. Greetings, Alex On 21.10.2010 16:21, Thierry Boileau wrote: Hi Alexander, I have a look at these errors right now. All in all I got the feeling, maven didn't supporteditions, hum, each editions has its own group id: org.restlet.edition, whereedition can have one of the following values = jse, jee, gae, android, gwt. so building with maven it won't be supported anylonger (due to the fact that it is useless without editions). Is that correct? it should work. I have a look at this. Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2674335 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2674369
Re: POST Requests return with a 405 with @Post annotated method
Same problem, using SpringServer... I would like to fix that bug by myself, but I still cannot compile restlet. Ant build just gets stuck somewhere in the Tests (last message is Running org.restlet.test.RestletTestSuite), while maven obvirously cannot load all dependencies (netty and db4o seems to be problematic). All in all I got the feeling, maven didn't support editions, so building with maven it won't be supported any longer (due to the fact that it is useless without editions). Is that correct? Greetings, Alex On 18.10.2010 19:39, webp...@tigris.org wrote: I get this problem with 2.0.1 and 2.1 fetched today (18 Oct 2010) (Java SE versions) using the internal server. The example FirstResource application fails. Problem also occurs with PUT. 2.0.RC4 works (well, that bit did) Peter Furniss -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2673141 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2673559
Re: POST Requests return with a 405 with @Post annotated method
Same error with 2.1... On 17.10.2010 16:32, Alexander Kampmann wrote: I would like to try an own build, but neither ant nor maven work for me. On 17.10.2010 14:56, Alexander Kampmann wrote: hello, I am using the restlet- jars from the maven.restlet.org- Repository (so, the public ones). That means, they are refreshed on the 1st and the 15th of each month. Due to that, Thierry's changes should be in there by now (he reported them on 22th of September). My Version is JEE Restlet 2.0.1. But in fact I get exactly the error Dustin reported about. When I try to POST to my resource, the server says 405 - Method not allowed, but the header says Allows: GET, POST. The @Post- Annotation is present. Maybe the change didn't make it to the maven- repository by now? Or is there any possibility things went wrong for other reasons? (I've got quite a large Inheritance- Hierarchy, in fact the annotation is in an interface and the Restlet- class is inherited from a class, which implements the interface and ServerResource, could that be a problem?) The environment is a RestletApplication packed as war and deployed to Tomcat 6.0.29 as it was for Dustin. All the other resources (using get) including the get- Method of that resource work fine. Greetings, Alex On 23.09.2010 01:07, Dustin N. Jenkins wrote: Lovely, thanks Thierry! DNJ On 09/22/2010 10:20 AM, Thierry Boileau wrote: Hello Dustin, thanks for your report. I've fixed this bug in the svn repository (trunk and 2.0 branch). Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2663402 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2672749 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2672760 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2673047
RE: Re: POST Requests return with a 405 with @Post annotated method
I get this problem with 2.0.1 and 2.1 fetched today (18 Oct 2010) (Java SE versions) using the internal server. The example FirstResource application fails. Problem also occurs with PUT. 2.0.RC4 works (well, that bit did) Peter Furniss -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2673141
Re: POST Requests return with a 405 with @Post annotated method
hello, I am using the restlet- jars from the maven.restlet.org- Repository (so, the public ones). That means, they are refreshed on the 1st and the 15th of each month. Due to that, Thierry's changes should be in there by now (he reported them on 22th of September). My Version is JEE Restlet 2.0.1. But in fact I get exactly the error Dustin reported about. When I try to POST to my resource, the server says 405 - Method not allowed, but the header says Allows: GET, POST. The @Post- Annotation is present. Maybe the change didn't make it to the maven- repository by now? Or is there any possibility things went wrong for other reasons? (I've got quite a large Inheritance- Hierarchy, in fact the annotation is in an interface and the Restlet- class is inherited from a class, which implements the interface and ServerResource, could that be a problem?) The environment is a RestletApplication packed as war and deployed to Tomcat 6.0.29 as it was for Dustin. All the other resources (using get) including the get- Method of that resource work fine. Greetings, Alex On 23.09.2010 01:07, Dustin N. Jenkins wrote: Lovely, thanks Thierry! DNJ On 09/22/2010 10:20 AM, Thierry Boileau wrote: Hello Dustin, thanks for your report. I've fixed this bug in the svn repository (trunk and 2.0 branch). Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2663402 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2672749
Re: POST Requests return with a 405 with @Post annotated method
I would like to try an own build, but neither ant nor maven work for me. On 17.10.2010 14:56, Alexander Kampmann wrote: hello, I am using the restlet- jars from the maven.restlet.org- Repository (so, the public ones). That means, they are refreshed on the 1st and the 15th of each month. Due to that, Thierry's changes should be in there by now (he reported them on 22th of September). My Version is JEE Restlet 2.0.1. But in fact I get exactly the error Dustin reported about. When I try to POST to my resource, the server says 405 - Method not allowed, but the header says Allows: GET, POST. The @Post- Annotation is present. Maybe the change didn't make it to the maven- repository by now? Or is there any possibility things went wrong for other reasons? (I've got quite a large Inheritance- Hierarchy, in fact the annotation is in an interface and the Restlet- class is inherited from a class, which implements the interface and ServerResource, could that be a problem?) The environment is a RestletApplication packed as war and deployed to Tomcat 6.0.29 as it was for Dustin. All the other resources (using get) including the get- Method of that resource work fine. Greetings, Alex On 23.09.2010 01:07, Dustin N. Jenkins wrote: Lovely, thanks Thierry! DNJ On 09/22/2010 10:20 AM, Thierry Boileau wrote: Hello Dustin, thanks for your report. I've fixed this bug in the svn repository (trunk and 2.0 branch). Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2663402 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2672749 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2672760
RE: Re: POST Requests return with a 405 with @Post annotated method
Hello Dustin, thanks for your report. I've fixed this bug in the svn repository (trunk and 2.0 branch). Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2663402
Re: POST Requests return with a 405 with @Post annotated method
I have just confirmed that this issue is not present in Restlet 2.0.0. Thanks, Dustin On 09/15/2010 09:10 AM, Dustin N. Jenkins wrote: I'm using Restlet 2.0.1 with JDK 1.6 in Tomcat 6.0.29. Nobody else has mentioned this, so I assume that it's something I'm doing. When I upgraded to 2.0.1 from 2.0m7, the POST requests all returned a 405 Method Not Allowed status. Here's how my method is defined: /** */ @Post public Representation acceptRepresentation(final Representation entity) { Do I need to define a better MetadataService or anything? Is this a known issue to anybody else? I'm about to try version 2.0.0 to see if it happens there. Thanks, Dustin -- Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca facsimile/télécopieur: (250) 363-0045 National Research Council Canada | 5071 West Saanich Rd, Victoria BC. V9E 2E7 Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria (C.-B) V9E 2E7 Government of Canada | Gouvernement du Canada -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2660320