Building .jar with Persistence Unit

Hi everyone,

I've got into a pickle here.

I've got a server program that is meant to pull/push data to/from database using Persistence Unit I have added to the project. Now it all works in the IntelliJ when I click run. However when I build the .jar file it does not work. My client program just crashes and I can see that there is no connection made to the database. I've added the javax.persistence.jar to the classpath in the Artifacts section of the Project Structure and I can also see the JPA descriptors being added to the the .jar file.

What am I doing wrong?

Any help would be appreciated.

DMan

Please sign in to leave a comment.