Can you make a full unit test (but as minimal as possible) in an eclipse (or maven) project with I'm curious to this to but have no direct answer.
Did you try to do a save of the entity as the error states? Is ID generation working?
Sorry for the delay. I've uploaded a modified version of the Hello world example which exposes this problem here: http://github.com/protocol7/jbmp4-helloworld-persist (if you do not use Git, you can download everything using the "Download source" button. Just run the Main class and you should get the exception.
You have to persist your Hibernate entities first. jBPM will use the generated id to link the entity as a variable (instead of serializing the complete object). A quick way to persist your entity is to create a custom command (where you have access to the Hibernate session via environment.get(Session.class).
Check org.jbpm.test.hibernatelongid.HibernateLongIdTest to see an example.
Thanks a bunch, works like a charm. I've updated the code on GitHub. How about adding something correspoding to PersistCommand to jBPM to make this a bit more obvious to thick people like myself? :-)