-->
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: Exception while loading.
PostPosted: Mon Jun 22, 2009 1:30 pm 
Newbie

Joined: Sat Oct 11, 2008 7:28 am
Posts: 10
Location: New Delhi (INDIA)
Hi Friends,

I am trying to retrieve address's objects using a hibernate query but there occuring an exception.
Following is the detail:
i have defined a field "ownerType" in a java class which is mapped with database:
Code:
private String ownerType=null;
   public String getOwnerType() {
      return ownerType;
   }
   
   public void setOwnerType(String ownerType) {
      this.ownerType = ownerType;
   }


Following is the mapping entry:
Code:
<property name="ownerType" column="OWNERTYPE" type="java.lang.String"/>


And the exception occuring for this field is:
Quote:
Hibernate: /* load com.raisonne.billsmart.userobjects.AddressPO */ select addresspo0_.ADDRESSID as ADDRESSID2_0_, addresspo0_.TINNUMBER as TINNUMBER2_0_, addresspo0_.TITLEKEY as TITLEKEY2_0_, addresspo0_.FIRSTNAME as FIRSTNAME2_0_, addresspo0_.LASTNAME as LASTNAME2_0_, addresspo0_.STREET as STREET2_0_, addresspo0_.STRSUPPL1 as STRSUPPL7_2_0_, addresspo0_.POSTALCODE as POSTALCODE2_0_, addresspo0_.COUNTRY as COUNTRY2_0_, addresspo0_.REGION as REGION2_0_, addresspo0_.TELEPHONENUMBER as TELEPHO11_2_0_, addresspo0_.FAXNUMBER as FAXNUMBER2_0_, addresspo0_.MOBILE as MOBILE2_0_, addresspo0_.CITY as CITY2_0_, addresspo0_.ADDRESSTYPE as ADDRESS16_2_0_, addresspo0_.OWNERTYPE1 as OWNERTYPE18_2_0_, addresspo0_.DATEOFCREATION as DATEOFC17_2_0_ from address addresspo0_ where addresspo0_.ADDRESSID=?
22:47:11,562 WARN org.hibernate.util.JDBCExceptionReporter {1}:71 -SQL Error: 1054, SQLState: 42S22
22:47:11,562ERROR org.hibernate.util.JDBCExceptionReporter {1}:72 -Unknown column 'addresspo0_.OWNERTYPE' in 'field list'
22:47:11,578 INFO org.hibernate.event.def.DefaultLoadEventListener {1}:95 -Error performing load command
org.hibernate.exception.SQLGrammarException: could not load an entity: [com.raisonne.billsmart.userobjects.AddressPO#2]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1799)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:47)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:41)

_________________
Thanks,
Arun


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.