JBoss Community

Re: Human task + HornetQ + persistence + MySQL => ununderstanding stacktrace

created by Sandra Renaud in jBPM - View the full discussion

After searching, I found that the main problem comes from the GeneratorId of Task.

 

@Entity

public class Task implements Externalizable {

     @Id

     @GeneratedValue(strategy = GenerationType.AUTO)

     private long id;


The AUTO GenerationType let MySQL choose how to implements the id generation. But the created table have no autoIncrement option and no default value.

 

If I add manually a defaut value I obtain an error like

Caused by: org.hibernate.HibernateException: The database returned no natively generated identity value

 

I could check manually the option "Auto increment" in MySQL but I would like to do this automatically at the tables creation. But how can I do that without change the GenerationType to IDENTITY?

Should I change the Taskorm.xml like for jbpm-console?

 

Thanks to help.

Reply to this message by going to Community

Start a new discussion in jBPM at Community