-->
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
PostPosted: Thu Apr 05, 2012 7:04 am 
Newbie

Joined: Thu Apr 05, 2012 1:34 am
Posts: 1
Hi,

I am working on a RESTEasy Web services project using hibernate JPA. My project name is filterservice. TblMasterdata is the JPA
entity name which is also existing in my database. TblMasterdata structure in database is:
ID bigint(20)
CodeId bigint(20)
Code varchar(100)
Value varchar(100)
ComponentVisibleType varchar(100)
Description1 varchar(100)
Description2 varchar(100)

Now if i use some fields like CodeId in TblMasterdata entity and run filterservice, I get the following error in logs:
org.hibernate.HibernateException: Missing column: code_id in fedmine_dev.tbl_masterdata_6_jan_2012
at org.hibernate.mapping.Table.validateColumns(Table.java:275)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1271)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1740)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

So here i am not getting, when CodeId is existing in database, why it is showing as missing column in logs.

Thanks
Sumit Tomar


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.