2

am trying to create MySQL tables with Hibernate, and this is the error am getting,

ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 12) HHH000388: Unsuccessful: create table parcel_parcels (id bigint not null, description TEXT, from varchar(255), to varchar(255), cost double precision, route varchar(255), primary key (id)) ENGINE=InnoDB 22:56:41,692 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 12) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from varchar(255), to varchar(255), cost double precision, route varchar(255), p' at line 1

S Murani
  • 318
  • 1
  • 2
  • 8
  • 1
    i suspect it's not happy with the use of the reserved word 'from' as a column name. http://stackoverflow.com/questions/23446377/syntax-error-due-to-using-a-reserved-word-as-a-table-or-column-name-in-mysql – kem Jun 22 '16 at 20:46
  • @kem, thanks, use of the key word from was the problem, – S Murani Jun 23 '16 at 05:26

1 Answers1

3

Make sure you have included well defind mysql in your standalone.xml inside your wildfly. Secondly make sure you have downloaded the correct mysql dependency. Third check your persistance.xml file. And make sure the mysql configurations are correct

J.Oginga
  • 481
  • 2
  • 9