[jboss-user] [jBPM] - Re: Human task + HornetQ + persistence + MySQL => ununderstanding stacktrace
Sandra Renaud
do-not-reply at jboss.com
Fri Oct 26 05:15:13 EDT 2012
Sandra Renaud [https://community.jboss.org/people/joploya] created the discussion
"Re: Human task + HornetQ + persistence + MySQL => ununderstanding stacktrace"
To view the discussion, visit: https://community.jboss.org/message/772527#772527
--------------------------------------------------------------
After searching, I found that the main problem comes from the GeneratorId of Task.
> @ http://grepcode.com/file/repo1.maven.org/maven2/javax.persistence/persistence-api/1.0/javax/persistence/Entity.java#Entity Entity
> public class Task implements http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/io/Externalizable.java#Externalizable Externalizable {
> @ http://grepcode.com/file/repo1.maven.org/maven2/javax.persistence/persistence-api/1.0/javax/persistence/Id.java#Id Id
> @ http://grepcode.com/file/repo1.maven.org/maven2/javax.persistence/persistence-api/1.0/javax/persistence/GeneratedValue.java#GeneratedValue GeneratedValue(strategy = http://grepcode.com/file/repo1.maven.org/maven2/javax.persistence/persistence-api/1.0/javax/persistence/GenerationType.java#GenerationType.0AUTO GenerationType.AUTO (http://grepcode.com/file/repo1.maven.org/maven2/javax.persistence/persistence-api/1.0/javax/persistence/GenerationType.java#GenerationType.0AUTO))
> 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
[https://community.jboss.org/message/772527#772527]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121026/55fed3b8/attachment-0001.html
More information about the jboss-user
mailing list