2 Replies Latest reply on Sep 23, 2014 11:57 AM by vineet.reynolds

    Ticket Monster in MySQL issue

    leets003

      Dear all,

       

      It is very great to learn the JBoss following with the Ticket Monster tutorial.  It can run on Jboss EAP 6.3.  However when I change the Datasource from H2 in-memory database to mySQL database.  I experienced the problem on create Table Show.  It conflicted the mySQL SQL "Show" command.


      On the log, it show the below error message and fail to create the show table.

      22:21:23,973 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) 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 'Show (id bigint not null auto_increment, event_id bigint not null, venue_id bigi' at line 1

      22:21:25,639 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) HHH000389: Unsuccessful: alter table Show add constraint UK_pn5wxc4yrspdflf414rp2337c unique (event_id, venue_id)

      22:21:25,640 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 49) 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 'Show add constraint UK_pn5wxc4yrspdflf414rp2337c unique (event_id, venue_id)' at line 1

       

      On persistence.xml, I have added the below dialect. But got the same issue.

      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

       

      Is there any way to amend it and the Ticket Monster can run on mySQL database instead of the H2 in-memory database?

       

      Thanks

       

      Patrick Lee