Hibernate "is not mapped" exception
I just encountered a problem with my hibernate configurations.

I would be happy, if you can help me solve this problem.

Greetings and thanks in advance,
TLS



The Stacktrace I get is:


I call it in a Managed bean via:
    public void loadProjectList()
    {
    Session session = SessionHandler.getSessionFactory().openSession();
    session.beginTransaction();
    List list = session.createQuery("FROM TESTPROJECTBEAN").list();
    iTBProjectList = (ProjectDetails[]) list.toArray(new ProjectDetails[0]);
    session.getTransaction().commit();
    session.close();
    fillLists();
    }

The "ProjectDetails"-class:
	package projectConfiguration;
	
	import javax.persistence.*;
	
	@Entity
	@Table (name="TESTPROJECTBEAN")
	public class ProjectDetails {
		@Id
	    @GeneratedValue
	    @Column (name="PK")
	    private Integer projectId;
		
		@Column (nullable=false, name="PROJNAME")
		private String projectName;
	
		public Integer getProjectId() {
			return projectId;
		}
	
		public void setProjectId(Integer projectId) {
			this.projectId = projectId;
		}
	
		public String getProjectName() {
			return projectName;
		}
	
		public void setProjectName(String projectName) {
			this.projectName = projectName;
		}
	}

My hibernate.cfg.xml:
	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD     3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
	<hibernate-configuration>
	  <session-factory>
		<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
		<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
		<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
		<property name="hibernate.connection.username">testbench</property>
		<property name="hibernate.connection.password">testbench</property>
		<property name="hibernate.hbm2ddl.auto">update</property>
		<mapping class="projectConfiguration.ProjectDetails"/>
	  </session-factory>
	</hibernate-configuration>
Hibernate "is not mapped" exception
===

I just encountered a problem with my hibernate configurations.

I would be happy, if you can help me solve this problem.

Greetings and thanks in advance,
TLS



The Stacktrace I get is:


I call it in a Managed bean via:
    public void loadProjectList()
    {
    Session session = SessionHandler.getSessionFactory().openSession();
    session.beginTransaction();
    List list = session.createQuery("FROM TESTPROJECTBEAN").list();
    iTBProjectList = (ProjectDetails[]) list.toArray(new ProjectDetails[0]);
    session.getTransaction().commit();
    session.close();
    fillLists();
    }

The "ProjectDetails"-class:
	package projectConfiguration;
	
	import javax.persistence.*;
	
	@Entity
	@Table (name="TESTPROJECTBEAN")
	public class ProjectDetails {
		@Id
	    @GeneratedValue
	    @Column (name="PK")
	    private Integer projectId;
		
		@Column (nullable=false, name="PROJNAME")
		private String projectName;
	
		public Integer getProjectId() {
			return projectId;
		}
	
		public void setProjectId(Integer projectId) {
			this.projectId = projectId;
		}
	
		public String getProjectName() {
			return projectName;
		}
	
		public void setProjectName(String projectName) {
			this.projectName = projectName;
		}
	}

My hibernate.cfg.xml:
	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD     3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
	<hibernate-configuration>
	  <session-factory>
		<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
		<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
		<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
		<property name="hibernate.connection.username">testbench</property>
		<property name="hibernate.connection.password">testbench</property>
		<property name="hibernate.hbm2ddl.auto">update</property>
		<mapping class="projectConfiguration.ProjectDetails"/>
	  </session-factory>
	</hibernate-configuration>