JPA Vs Hibernate

hibernate-thumbnail

I have come across this question from many of our readers and who ever working on the hibernate framework : What is the difference between Java Persistence API (JPA) and Hibernate ORM Framework. This post simply answer to those who are confusing with JPA and Hibernate difference. JPA and Hibernate Difference JPA is a specification for […]

How To Create EntityManagerFactory in JPA

hibernate-thumbnail

This tutorial explains how to create EntityManagerFactory in your JPA application when you are writing your first JPA programming. It is the standard way of creating the factory if you use the JPA specification. Normally there are two ways to create the factory, one is through the configuration file persistence.xml and another one is through the […]

JPA EntityManagerFactory Vs Hibernate’s SessionFactory

hibernate-thumbnail

If you are using the JPA’s standard specification implementation (Read : Introduction to JPA), then you would use EntityManagerFactory for opening the session. But, if you are using the hibernate implementation, you have hibernate specific SessionFactory for managing the sessions. Here there is lot of confusion between developers like which one is the best approach. […]

JPA 2 MetaModel Generator using Ant

hibernate-thumbnail

In my previous article I have explained how to generate metamodel using your Eclipse IDE. However, in most scenarios you will have to create from your build scripts. This tutorial explains how to add this option in your ant script. For the detailed explanation on project example code, please refer the previous post. Here I […]

JPA 2 MetaModel Generation using Eclipse

hibernate-thumbnail

JPA 2.0 introduces the strongly typed Criteria API for going away with the Java Persistence Query (JQL) language. It comes with the metamodel for helping the typed objects. Every entity must have a meta model generated with underscore(_) added to its name. These objects will be referred in the Criteria API instead of using the […]

Hibernate 4 Basic Configuration + Setup Example

hibernate-thumbnail

This tutorial explains the very basic configuration and installation of hibernate configuration for your project. It is a standalone program, but the same configuration would applicable for the web applications. Here I am using the XML configuration approach, I will write another tutorial for using the annotations. Here I assume that you have installed the […]

How To Create Session Factory in Hibernate 4

hibernate-thumbnail

There are many APIs deprecated in the hibernate core framework. One of the frustrating point at this time is, hibernate official documentation is not providing the clear instructions on how to use the new API and it stats that the documentation is in complete. Also each incremental version gets changes on some of the important […]

Hibernate Exception – javassist.util.proxy.MethodFilter

hibernate-thumbnail

If you are using Hibernate 4, you would hit this exception while setting up the first hibernate application. The missing library is javassist. To resolve this problem, either manually download the JAR file or add the below maven try to your project’s POM.xml. Once you added these library, the error will be fixed. This library […]

Hibernate Exception – Unable to load class com.mysql.jdbc.Driver

hibernate-thumbnail

If you are using MySQL database for your hibernate application, then you have to add the MYSQL driver library in your classpath for accessing the database. If you fail to do that, you will end up in the following exception. You can manually download that jar file or add the maven entry as below. Exception […]

Hibernate Exception – org/dom4j/DocumentException

hibernate-thumbnail

If you are setting up the first hibernate application, there is chance that you would get the following exception if the required dependency is missed. The reason is you have not included the dom4j-1.6.1.jar file which is used internally by the hibernate core for parsing the XML documents. The result will be the following exception. Either you […]

Close
Please support the site
By clicking any of these buttons you help our site to get better