Hi Axon devs
I’m working on a project where we use Axon and a JPA repository for events. Until recently I was using a 2.0 RC build of Axon from December 2012 and everything was fine; events could be serialized and then deserialized later without problems.
But when I switched to the new 2.0 version, I suddenly started getting errors for new events, i.e. events serialized after the version bump.
Events are written without issue, but later when they are reloaded I get a StreamException from XStream when accessing the payload of a serialized domain event for the first time. The specific error is “only whitespace content allowed before start tag and not \ufffd (position: START_DOCUMENT seen \ufffd… @1:1)”, and like I mentioned, it only applies to events serialized after I switched to the newest version. I use the default XStream serialization.
The Axon dependencies haven’t changed since my RC build, AFAICT, but using “git bisect” from my working build of Axon (GIT: “e1ce97c6e30affece161a341113d0e1999a79a4a”), I can see that the problem seems to have been introduced in a commit annotated “Big refactoring of upcasting process” (GIT: “6549a136c813aa6dbaee444c606141a0bc0cfae4”).
Any ideas as to what happened?
/Mads
PS: I should note that I’m using Hibernate 3.5.6-Final, since that caused some problems earlier that were swiftly resolved by the Axon team