[jboss-user] [jBPM] - Invalid JPA definition for ProcessInstanceLog v5.4.0, leads to Hibernate exception

Julien Serdaru do-not-reply at jboss.com
Tue Jan 29 16:24:09 EST 2013


Julien Serdaru [https://community.jboss.org/people/jserdaru] created the discussion

"Invalid JPA definition for ProcessInstanceLog v5.4.0, leads to Hibernate exception"

To view the discussion, visit: https://community.jboss.org/message/795008#795008

--------------------------------------------------------------
Hello, there. I see that the ProcessInstanceLog class has been modified between 5.3.0 and 5.4.0. The following persistent properties have been added:

@Column(nullable=true)private int status;@Column(nullable=true)private long parentProcessInstanceId;@Column(nullable=true)private String outcome;

However, I think having a nullable property with a primitive type is not going to work when loading data with the "parentProcessInstanceId" or "status" having null values (which happens in my case).

Hibernate complains: 

Caused by: java.lang.IllegalArgumentException: *Can not set long field org.jbpm.process.audit.ProcessInstanceLog.parentProcessInstanceId to null value*
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
    at sun.reflect.UnsafeLongFieldAccessorImpl.set(UnsafeLongFieldAccessorImpl.java:62)
    at java.lang.reflect.Field.set(Field.java:657)
    at *org.hibernate.property.DirectPropertyAccessor$DirectSetter*.set(DirectPropertyAccessor.java:139)

I think a simple fix would be to substitute int with Integer, long with Long, and modifiy the setter/getter methods accordingly.

Am i the only one with the problem? Should I open an issue on Jira?

Thanks for your help.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795008#795008]

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/20130129/d05a0d65/attachment.html 


More information about the jboss-user mailing list