Add licence header to pom.xml. Fixed missing msg in the exception