Skip to content

Latest commit

 

History

History
112 lines (83 loc) · 4.04 KB

README.adoc

File metadata and controls

112 lines (83 loc) · 4.04 KB

hibernate: How to Use Hibernate in an Application

The hibernate quickstart demonstrates how to use Hibernate ORM 6 over Persistence, using Bean Validation, and Enterprise Beans.

What is it?

The hibernate quickstart is based upon the kitchensink example, but demonstrates how to use Hibernate Object/Relational Mapping (ORM) over Persistence in {productNameFull}.

This project is setup to allow you to create a compliant {javaVersion} application using Faces, Contexts and Dependency Injection, Enterprise Beans, Persistence, Hibernate ORM and Bean Validation. It includes a persistence unit, Persistence use to help you with database access.

Add the Correct Dependencies

{productName} provides Hibernate 6 and Persistence support.

If you use Hibernate 6 packaged within {productName}, you will need to first import the Persistence API.

This quickstart demonstrates usage of Persistence and Bean Validation.

If you look at the pom.xml file in the root of the hibernate quickstart directory, you will see that the dependencies for the Hibernate modules have been added with the scope as provided.

For example:

<dependency>
   <groupId>org.hibernate.validator</groupId>
   <artifactId>hibernate-validator</artifactId>
    <scope>provided</scope>
</dependency>

Access the Application

The application will be running at the following URL: http://localhost:8080/{artifactId}/.

Server Log: Expected Warnings and Errors

You will see the following warnings in the server log. You can ignore these warnings.

WFLYJCA0091: -ds.xml file deployments are deprecated. Support may be removed in a future version.
Note

You might see the following message when you run the command. It indicates the source is not provided in the third-party antlr JAR.

[INFO] The following files have NOT been resolved:
[INFO]    antlr:antlr:jar:sources:2.7.7:provided