Skip to content
A playground for working with hibernate
Branch: jpa-and-xml
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Hibernate standalone test app

Hibernate standalone test application using JPA api to generate database schema and then persist and query an item.

How to run

Getting run a database

Download jdbc driver (e.g. for PostgreSQL, see and run the database itself. The easiest way is probably with Docker

docker run -p 5432:5432 --rm  -ePOSTGRES_USER=test -e POSTGRES_PASSWORD=test postgres:9.4 -c max-prepared-transactions=110 -c log-statement=all

Run the app

If your database is running at different machine than at localhost:5432 or with different credentials than test/test then consider to make changes in src/main/resources/persistence.xml.

mvn clean package
java -cp target/hibernate-standalone-1.0-SNAPSHOT-jar-with-dependencies.jar:./postgresql-42.2.2.jar:. cz.chalda.Main
You can’t perform that action at this time.