This happen when you have a name which is a reserved name or already exists by a table for example.
Lets say your are trying to add a new table and the error was: org.postgresql.util.PSQLException: ERROR: syntax error at or near "mytable"
You got this error since the postgresql in the current schema has already a mytable table or table is not there and this name is reserved.
Change your table name to a different and then try out and make sure you have the table created.