SVN repository error

In the process of creating a maven release for OpenPatrician the SVN repository got currupted. Though I have no idea how. There were two different error messages:

svn: Checksum mismatch for ‚.svn/text-base/blah.ext‘;
expected: ‚f8d45250f7df5561635854165862fdd8‘,
actual: ‚644f85c4befa671150c5c6ec5fad9885‘

svn: Reading one svndiff window read beyond the end of the representation

The one side which had something to say about this was Andrew Hedges blog. As a result I checkout the version previous to the corruption, commited all the changes to a new revision save the corrupt file. Then I checked the pom.xml which apparently was corrupt in the repository. There I saw that the file was empty. Seems that svn commits do not really follow ACID. I deleted the file in the repo and forced the commit from my workspace, which worked.

Thunderbird and Firfox crash on startup

Due to a messed up update (misconfiguration of Gnome), I was forced to reinstall my Linux. I took this opportunity to upgrade to LMDE 201303 (Update pack 6). When starting up the new system everything worked fine, but as I went along to configure it as I wanted it to be, Firefox and Thunderbird stopped working. Firefox did not start anymore at all, without any error message. Thunderbird tried to send a crash report, but failed also without any error message.

It took me some iterations of reinstalling the system to solve the mystery. So in case you stumble into the same problem, here is my cause/solution:

I had my system set up with different partitions, so they had to be mounted. I usually use ( /, /usr, /opt and /home). As it turned out everything fell apart as soon as I mounted my old /opt partition. The reason for this is that both Firefox and Thunderbird are installed there (on Linux Mint Debian Edition at least). So this of course meant that The configuration and the application did not match.

Combining standalone application with Spring

When you are developing a standalone application, that you want to use with the SpringFramework, somewhere in your code you will have to load the application context. Potentially this results in chicken-egg problem, especially when you want to use a component in some class that is not a bean. This may have different causes:

  • It is the main class, that is used to start up the application
  • The constructor uses arguments that cannot be resolved with autowireing

There are different approaches to solve this, the most elegant one I will demonstrate. „Combining standalone application with Spring“ weiterlesen

Transaction isolation with Spring and Hibernate

Recently I had to investigate the question of stale data that may be passed over transactional borders in our application. The application is Spring based using JPA with Hibernate to access the database. The answer to the above question is not that interesting, but to give it I had to understand how this whole stuff is set up and configured. There are are quite some resources which address something like this, but when coming to Spring, in recent time the approach to implement this when from directly using Hibernate to using Hibernate through JPA, while there are quite some books and tutorials on this, none also include specific information how to set the isolation level and what happens when you use the optimistic locking approach.

„Transaction isolation with Spring and Hibernate“ weiterlesen