java.lang.reflect.InvocationTargetException: null

Root problem Looks like bug https://hibernate.atlassian.net/browse/HHH-12368 They recommended set property (I believe it’s the best workaround): as workaround is to disable hibernate to detect this function by setting flag hibernate.jdbc.lob.non_contextual_creation=true The other solution described here: http://vkuzel.blogspot.com.cy/2016/03/spring-boot-jpa-hibernate-atomikos.html Disable feature detection by this undocumented parameter. Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details. spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false So you can also … Read more

when to throw FileNotFoundException

Java has some controversy about its exceptions. It has two classes of exceptions. Checked and unchecked. Any exception extending from RuntimeException or Error is unchecked and does not need to be caught or explicitly declared as throwable in a method signature. FileNotFound is however a checked exception and must either be caught or declared as … Read more

Printing a java map Map – How?

I’m sure there’s some nice library that does this sort of thing already for you… But to just stick with the approach you’re already going with, Map#entrySet gives you a combined Object with the key and the value. So something like: will do what you’re after. If you’re using java 8, there’s also the new streaming approach.