-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.HibernateException: Missing column...in public
PostPosted: Thu Jan 15, 2009 8:11 am 
Newbie

Joined: Tue Jan 13, 2009 11:23 am
Posts: 12
Hi,
I am developping an application with jboss seam 2.0.3,
I have this error when I deploy my application to the server:
Code:
12:53:27,468 INFO  [TableMetadata] table found: public.users
12:53:27,468 INFO  [TableMetadata] columns: [username, role_id, email, group_id, created_at, actif, password, last_login]
12:53:27,468 ERROR [[/Sigpn]] Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.jboss.seam.servlet.SeamListener
org.jboss.seam.InstantiationException: Could not instantiate Seam component: SigpnEntityManagerFactory
   at org.jboss.seam.Component.newInstance(Component.java:1986)
   at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
   at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
   at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
   at org.jboss.seam.init.Initialization.init(Initialization.java:596)
   at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
..........
Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Missing column: role in public.users
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
   at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
   at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
   at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
   at org.jboss.seam.Component.callComponentMethod(Component.java:2100)
   at org.jboss.seam.Component.callCreateMethod(Component.java:2015)
   at org.jboss.seam.Component.newInstance(Component.java:1976)


this is my class .java:
Code:
@Entity
@Table(name = "users", schema = "public")
public class Users implements java.io.Serializable {

   private String username;
   private Roles roles;
   private Groups groups;
   private String password;
   private String email;
   private Date createdAt;
   private Date lastLogin;
   private Boolean actif;


I use the postgresql 8.2 database, and this my table
Code:

CREATE TABLE users
(
  username character varying(128) NOT NULL,
  "password" character varying(128) NOT NULL,
  email character varying(128),
  created_at date,
  last_login date,
  actif boolean,
  role_id integer NOT NULL,
  group_id integer NOT NULL,
  CONSTRAINT pk_users PRIMARY KEY (username),
  CONSTRAINT fk_group_id FOREIGN KEY (group_id)
      REFERENCES groups (group_id) MATCH SIMPLE
      ON UPDATE RESTRICT ON DELETE RESTRICT,
  CONSTRAINT fk_role_id FOREIGN KEY (role_id)
      REFERENCES roles (role_id) MATCH SIMPLE
      ON UPDATE RESTRICT ON DELETE RESTRICT
)
WITHOUT OIDS;
ALTER TABLE users OWNER TO "admin";


Have any one an idea to resolve this issue??
thx


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.