Hi!, I'm new to JPA and am trying to generate entities from some tables I've got in a Postgres database but its throwing me an exception that I can't seem to understand why its throwing it (its thrown at deployment time) =/
the exception thrown is:

01:13:48,074 INFO  [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.  
01:13:48,084 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=MeetMe.ear/MeetMeEJB.jar#MeetMeEJB state=Create  
javax.persistence.PersistenceException: [PersistenceUnit: MeetMeEJB] Unable to build EntityManagerFactory  
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)  
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)  
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)  
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
    at java.lang.reflect.Method.invoke(Method.java:597)  
    at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)  
    at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)  
    at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)  
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)  
    at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)  
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)  
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)  
    at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)  
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)  
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)  
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)  
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)  
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)  
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)  
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)  
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)  
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)  
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)  
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)  
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)  
    at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)  
    at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)  
    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)  
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)  
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)  
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)  
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)  
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)  
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)  
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)  
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)  
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)  
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)  
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)  
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)  
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)  
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)  
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)  
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)  
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)  
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)  
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)  
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)  
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)  
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)  
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)  
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)  
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)  
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
    at java.lang.Thread.run(Thread.java:662)  
Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: ar.com.meetme.model.entity.Message column: id_sender_userprofile (should be mapped with insert="false" update="false")  
    at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:670)  
    at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:692)  
    at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:714)  
    at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:468)  
    at org.hibernate.mapping.RootClass.validate(RootClass.java:215)  
    at org.hibernate.cfg.Configuration.validate(Configuration.java:1135)  
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1320)  
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)  
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)

the database tables are as follow:

CREATE TABLE message  
(  
  id_sender_userprofile bigint NOT NULL,  
  id_receiver_userprofile bigint NOT NULL,  
  date_sent date NOT NULL,  
  message character varying(500) NOT NULL,  
  CONSTRAINT message_pk PRIMARY KEY (id_sender_userprofile, id_receiver_userprofile, date_sent),  
  CONSTRAINT message_userprofile_fk1 FOREIGN KEY (id_sender_userprofile)  
      REFERENCES userprofile (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION,  
  CONSTRAINT message_userprofile_fk2 FOREIGN KEY (id_receiver_userprofile)  
      REFERENCES userprofile (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION  
)  
 
 
CREATE TABLE userprofile  
(  
  id bigint NOT NULL,  
  username character varying(30) NOT NULL,  
  "password" character varying(30) NOT NULL,  
  "name" character varying(30) NOT NULL,  
  lastname character varying(50) NOT NULL,  
  birthdate date NOT NULL,  
  status_id integer NOT NULL,  
  gender_id integer NOT NULL,  
  email character varying(50) NOT NULL,  
  registerdate date NOT NULL,  
  sexualorientation_id integer NOT NULL,  
  profilepicture character varying(255) NOT NULL,  
  description character varying(500),  
  country_id integer NOT NULL,  
  city_id integer NOT NULL,  
  CONSTRAINT userprofile_pk PRIMARY KEY (id),  
  CONSTRAINT userprofile_city_fk FOREIGN KEY (city_id)  
      REFERENCES city (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION,  
  CONSTRAINT userprofile_country_fk FOREIGN KEY (country_id)  
      REFERENCES country (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION,  
  CONSTRAINT userprofile_gender_fk FOREIGN KEY (gender_id)  
      REFERENCES gender (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION,  
  CONSTRAINT userprofile_maritalstatus_fk FOREIGN KEY (status_id)  
      REFERENCES maritalstatus (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION,  
  CONSTRAINT userprofile_sexualorientation_fk FOREIGN KEY (sexualorientation_id)  
      REFERENCES sexualorientation (id) MATCH SIMPLE  
      ON UPDATE NO ACTION ON DELETE NO ACTION,  
  CONSTRAINT userprofile_unique UNIQUE (username)  
)

The JPA Tools from Eclipse that I use to generate the entities from the tables generates me the following code for the entities:

@Entity  
public class Message implements Serializable {  
    private static final long serialVersionUID = 1L;  
 
    @EmbeddedId  
    private MessagePK id;  
 
    private String message;  
 
    //bi-directional many-to-one association to UserProfile  
    @ManyToOne  
    @JoinColumn(name="id_sender_userprofile")  
    private UserProfile userProfile_from;  
 
    //bi-directional many-to-one association to UserProfile  
    @ManyToOne  
    @JoinColumn(name="id_receiver_userprofile")  
    private UserProfile userProfile_to;  
 
    public Message() {  
    }  
 
    public MessagePK getId() {  
        return this.id;  
    }  
 
    public void setId(MessagePK id) {  
        this.id = id;  
    }  
 
    public String getMessage() {  
        return this.message;  
    }  
 
    public void setMessage(String message) {  
        this.message = message;  
    }  
 
    public UserProfile getUserProfile_from() {  
        return this.userProfile_from;  
    }  
 
    public void setUserProfile_from(UserProfile userProfile_from) {  
        this.userProfile_from = userProfile_from;  
    }  
 
    public UserProfile getUserProfile_to() {  
        return this.userProfile_to;  
    }  
 
    public void setUserProfile_to(UserProfile userProfile_to) {  
        this.userProfile_to = userProfile_to;  
    }  
 
}

@Entity  
@NamedQueries({ @NamedQuery(name = UserProfile.getUserProfileByUsername, query = "SELECT up FROM UserProfile up WHERE up.username = :username"),  
                @NamedQuery(name = UserProfile.getNextUserProfiles, query = "SELECT up FROM UserProfile up")})  
public class UserProfile implements Serializable {  
    public static final String getUserProfileByUsername = "UserProfile.getUserProfileByUsername";  
    public static final String getNextUserProfiles = "UserProfile.getNextUserProfiles";  
 
    private static final long serialVersionUID = 1L;  
 
    @Id  
    @GeneratedValue(strategy=GenerationType.AUTO)  
    private Long id;  
 
    @Temporal( TemporalType.DATE)  
    private Date birthdate;  
 
    private String description;  
 
    private String email;  
 
    private String lastname;  
 
    private String name;  
 
    private String username;  
 
    private String password;  
 
    private String profilepicture;  
 
    @Temporal( TemporalType.DATE)  
    private Date registerdate;  
 
    //bi-directional many-to-one association to Match  
    @OneToMany(mappedBy="query_userProfile")  
    private Set<Match> matches;  
 
    //bi-directional many-to-one association to Match  
    @OneToMany(mappedBy="accept_userProfile")  
    private Set<Match> queried_userProfiles;  
 
    //bi-directional many-to-one association to Message  
    @OneToMany(mappedBy="userProfile_from")  
    private Set<Message> received_messages;  
 
    //bi-directional many-to-one association to Message  
    @OneToMany(mappedBy="userProfile_to")  
    private Set<Message> sent_messages;  
 
    //bi-directional many-to-one association to City  
    @ManyToOne  
    private City city;  
 
    //bi-directional many-to-one association to Country  
    @ManyToOne  
    private Country country;  
 
    //bi-directional many-to-one association to Gender  
    @ManyToOne  
    private Gender gender;  
 
    //bi-directional many-to-one association to MaritalStatus  
    @ManyToOne  
    @JoinColumn(name="status_id")  
    private MaritalStatus maritalStatus;  
 
    //bi-directional many-to-one association to SexualOrientation  
    @ManyToOne  
    private SexualOrientation sexualOrientation;  
 
    //bi-directional many-to-one association to UserRole  
    @OneToMany(mappedBy="userProfile")  
    private Set<UserRole> userRoles;  
 
    public UserProfile() {  
    }  
 
    public String getUsername() {  
        return username;  
    }  
 
    public void setUsername(String username) {  
        this.username = username;  
    }  
 
    public Long getId() {  
        return this.id;  
    }  
 
    public void setId(Long id) {  
        this.id = id;  
    }  
 
    public Date getBirthdate() {  
        return this.birthdate;  
    }  
 
    public void setBirthdate(Date birthdate) {  
        this.birthdate = birthdate;  
    }  
 
    public String getDescription() {  
        return this.description;  
    }  
 
    public void setDescription(String description) {  
        this.description = description;  
    }  
 
    public String getEmail() {  
        return this.email;  
    }  
 
    public void setEmail(String email) {  
        this.email = email;  
    }  
 
    public String getLastname() {  
        return this.lastname;  
    }  
 
    public void setLastname(String lastname) {  
        this.lastname = lastname;  
    }  
 
    public String getName() {  
        return this.name;  
    }  
 
    public void setName(String name) {  
        this.name = name;  
    }  
 
    public String getPassword() {  
        return this.password;  
    }  
 
    public void setPassword(String password) {  
        this.password = password;  
    }  
 
    public String getProfilepicture() {  
        return this.profilepicture;  
    }  
 
    public void setProfilepicture(String profilepicture) {  
        this.profilepicture = profilepicture;  
    }  
 
    public Date getRegisterdate() {  
        return this.registerdate;  
    }  
 
    public void setRegisterdate(Date registerdate) {  
        this.registerdate = registerdate;  
    }  
 
    public Set<Match> getMatches() {  
        return this.matches;  
    }  
 
    public void setMatches(Set<Match> matches) {  
        this.matches = matches;  
    }  
 
    public Set<Match> getQueried_userProfiles() {  
        return this.queried_userProfiles;  
    }  
 
    public void setQueried_userProfiles(Set<Match> queried_userProfiles) {  
        this.queried_userProfiles = queried_userProfiles;  
    }  
 
    public Set<Message> getReceived_messages() {  
        return this.received_messages;  
    }  
 
    public void setReceived_messages(Set<Message> received_messages) {  
        this.received_messages = received_messages;  
    }  
 
    public Set<Message> getSent_messages() {  
        return this.sent_messages;  
    }  
 
    public void setSent_messages(Set<Message> sent_messages) {  
        this.sent_messages = sent_messages;  
    }  
 
    public City getCity() {  
        return this.city;  
    }  
 
    public void setCity(City city) {  
        this.city = city;  
    }  
 
    public Country getCountry() {  
        return this.country;  
    }  
 
    public void setCountry(Country country) {  
        this.country = country;  
    }  
 
    public Gender getGender() {  
        return this.gender;  
    }  
 
    public void setGender(Gender gender) {  
        this.gender = gender;  
    }  
 
    public MaritalStatus getMaritalStatus() {  
        return this.maritalStatus;  
    }  
 
    public void setMaritalStatus(MaritalStatus maritalStatus) {  
        this.maritalStatus = maritalStatus;  
    }  
 
    public SexualOrientation getSexualOrientation() {  
        return this.sexualOrientation;  
    }  
 
    public void setSexualOrientation(SexualOrientation sexualOrientation) {  
        this.sexualOrientation = sexualOrientation;  
    }  
 
    public Set<UserRole> getUserRoles() {  
        return this.userRoles;  
    }  
 
    public void setUserRoles(Set<UserRole> userRoles) {  
        this.userRoles = userRoles;  
    }  
 
}

if I do put the attributes insertable=false, updatable=false, it stops complaining, but I don't like not knowing what its complaining about
Could anyone help me understand whats going on here?
sorry if it sounds stupid but I'm pretty new to JPA and am trying to learn and understand a little more

Thanks in advance!
Cheers,
Dieguinho