Announcement Announcement Module
Collapse
No announcement yet.
Error in create form - Request syntactically incorrect Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in create form - Request syntactically incorrect

    Hi everybody,
    I'm prototyping an application using Roo.

    I generally do not use the active entity pattern and the "web mvc scaffold" command but, as this is just a prototype, I opted for the fast lane
    When it comes to persist new entities, form the create form, I get the error:
    HTML Code:
    HTTP Status 400 -
    
    type Status report
    
    message
    
    description The request sent by the client was syntactically incorrect.
    It seems that it only happens when entities with java.util.Date properties are persisted. For entities without a Date property, everything works as expected.

    As I said, I'm pretty inexperienced on the Roo autogenerated code, so I feel a little bit lost among all the jspx and aspects it creates.

    Thanks,
    Stefano

    PS: I did not make any change or addition to the code generated by Roo, so it is quite pointless to past here bunches of code.
    Last edited by zakhrim; Mar 8th, 2013, 03:48 AM. Reason: fixed syntax

  • #2
    same problem with spring roo 1.2.3 and rest resources

    I think this is a bug related to spring roo 1.2.2 and 1.2.3 the controller confuse the request and send it to json controller

    I used this comand in earliers versions of spring roo without problems:
    json all --deepSerialize
    web mvc json setup
    web mvc json all --package ~.web


    Maybe is related to new annotation parameter "produces" like this:
    @RequestMapping(method = RequestMethod.POST, produces = "text/html")

    any suggestion?

    Comment


    • #3
      Do you have by any chance a property name that is the same as your Class name?

      public class Foo {
      private String foo;
      }
      This caused problems for me until I changed the property name to something else (ex: private String theFoo; )

      Comment

      Working...
      X