0

I'm trying out Spring Roo to generate CRUD operations for all of the tables in my database.

I get the following error:

HTTP Status 400 - 
description The request sent by the client was syntactically incorrect ().

Using Firebug, I can see that the URL generated is as follows:

_users=1&mydb=4&_mydb=1&userId=2&jpost=testing&abuseCount=1&lastUpdatedTs=Aug+26%2C+2012

What does the error mean?

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
LittleLebowski
  • 7,691
  • 13
  • 47
  • 72

1 Answers1

1

I got that same error and this is what caused it

I had one of the table names as jpost and also had a column with the same name=jpost. So when I sent jpost=testing (which is string) it tries to convert it to the jpost entity type, which produces an ArgumantTypeMismatch error. I changed the name of the column to be unique and it works correctly now.

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
  • I also was faced with the same error, so thanks for this answer. However am curious as to HOW you debugged to get the ArgumentTypeMismatch, i tried everything I could and eclipse/tomcat was not throwing any informative error at all other than "the request sent by the client is syntactically incorrect...". Would be good to know if there are some debugging tricks am missing – Tumaini Kilimba Jan 07 '16 at 09:17
  • Suppose some code produces a non-specific error. Take that string and make it simpler by half and try again. If the code has attributes, remove those attributes, if it has complex names or conditionals in it, remove them so it is simpler. If the non-specific error disappears after the removal, then you know the trouble is in the stuff you just removed, if it's still there, the trouble is somewhere else. Once you've removed the part that breaks it, add/remove pieces to isolate the one part that is wrong. Then ask google why that's wrong, and you eventually isolate the reason for the error. – Eric Leschinski Jan 07 '16 at 12:56
  • That strategy must work, because if you keep eliminating code, eventually you are left with the simplest possible hello-world program, and that is guaranteed to work. If it doesn't, then you have successfully isolated the problem to something other than your code, or the programming language you are using. This is a version of the divide and conquer algorithm, a principle of why binary search is super good O(log(n)) efficiency. – Eric Leschinski Jan 07 '16 at 12:58