Hi, this is my first application in Hibernate JPA, I created 2 projects in eclipse 1) daks - it's a
tomcat based web application 2) jpatest - JPA project in hibernate plate form. Then, I included jpatest project into my web project
java module dependency path. I included all the below hibernate jars into jpa project- jpatest classpath.
Please look at my project hierarchy below
EMFactoryListener is invoked when application starts, its been configured in web.xml
EMFactory is invoked by EMFactoryListener when application starts.
JPA hibernate persistence.xml is below which presents in META-INF folder
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="jpatest" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>com.daks.domain.Environment</class>
<class>com.daks.domain.EnvironmentProperties</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost/daksdb"/>
<property name="hibernate.default_schema" value="daksdb"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.password" value="password"/>
</properties>
</persistence-unit>
</persistence>
Getting the below exception in tomcat console when the web application is deployed
I have included the required libraries in class path and included persistence.xml into META-INF/ folder. I could not find out why I am thrown the above exception, could anyone advise me please. Thanks