More details please:
1) The exact JBossAS version
2) The Java version and vendor
3) Your deployers - the configuration and any relevant code
4) The entire exception stacktrace and the code which does the persisting.
Thank you for your answer jaikiran.
Unfortunately while cleaning up my code a bit, preparing a more detailed post, I realized that that the class reloading is not working. I always tested in debug mode and it was the debugger swapping in the new class definition :(. I was wondering anyway why it was working.
Probably when the classreloading works the JPA problem will disapear.