hi all!
i'm pretty new to java ee and i'm stuck on my 3rd program. i'm coding a library application. so there is 2 classes, books and persons.
however they are kept really simple, nontheless i get an error and can't figure out a solution:
error:
12:38:53,682 WARN [ServiceController] Problem starting service persistence.units:jar=a0326045_ASE_BSP2.jar,unitName=ASEDB
org.hibernate.MappingException: Could not determine type for: entity.server.Person, for columns: [org.hibernate.mapping.Column(PERSON)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
.
.
.
person.class:
Code:
package entity.server;
import javax.persistence.*;
@Entity
@Table(name="person")
@NamedQueries(value={
@NamedQuery(name= "Person.byName", query = "select p from Person p where name = :name order by p.name"),
@NamedQuery(name= "Person.allPersons", query = "select p from Person p order by p.name"),
@NamedQuery(name= "Person.byId", query = "select p from Person p where p.personId = :personId")
})
public class Person {
@Id
@Column(name="PERSONID")
private int personId;
public int getId(){return this.personId;}
public void setId(int personId){this.personId = personId;}
@Column(name="NAME")
private String name;
public String getName() {return name;}
public void setName(String newName) {this.name = newName;}
@Column(name="MAXBOOKS")
private int maximumBooks;
public int getMaximumBooks() {return maximumBooks;}
public void setMaximumBooks(int maximumBooks) {this.maximumBooks = maximumBooks;}
i haven't even called the entitybean in my session bean.
i would be more then thankful for any advice or idea,
thanks in advance
flokki