When I start my program I set some System properties. At the same time Hibernate is started and the classes initialized.
This calls the static block in Environment which copies the System properties to GLOBAL_PROPERTIES. This is not thread-safe although Properties/Hashtables are used.
In the javadoc it says, that the Hashtable has to be synchronized when an iterator is used.
Change it from:
I attached a small test case which can reproduce this issue. It is very annoying because it happens randomly.