Packaging akka microservice into a fat jar using Maven

I am trying to package an Akka microservice as a fat jar using the Maven shade plugin. However, I am getting an error saying “EntityManagerFactory” cannot be created. The service runs perfectly if I run it using mvn exec:exec as given in the Akka microservice tutorial.

Any guidance will be highly appreciated.