net.sf.hibernate.PropertyNotFoundException: Could not find a getter for iCondition in class org.hibernate.auction.AuctionItem

Hibernate JIRA | marcel thiel | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Our dataclass has following getters and setters, which looks very JavaBean conform. The problem is the "i" in iCondition. The problem is it is alone there.. private int iCondition; public int getICondition() { return iCondition; } public void setICondition(int iCondition) { this.iCondition = iCondition; } Here is the corresponding mapping: ... <property name="description"/> <property name="ends"/> <property name="iCondition" column="condition"/> <many-to-one name="seller" not-null="true"/> ... The error is: 16:01:04,634 INFO SessionFactoryImpl:119 - building session factory net.sf.hibernate.PropertyNotFoundException: Could not find a getter for iCondition in class org.hibernate.auction.AuctionItem at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182) at net.sf.hibernate.mapping.Property.getGetter(Property.java:175) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:733) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:714) at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768) at org.hibernate.auction.Main.main(Main.java:419) Exception in thread "main" When I make the property iiCondition and make getters and setters for it, it does work. It seems like the reflection part does work but the concatenating of the "get"+xxxxxx has something wrong in setting the characters to uppercase...

    Hibernate JIRA | 1 decade ago | marcel thiel
    net.sf.hibernate.PropertyNotFoundException: Could not find a getter for iCondition in class org.hibernate.auction.AuctionItem
  2. 0

    Our dataclass has following getters and setters, which looks very JavaBean conform. The problem is the "i" in iCondition. The problem is it is alone there.. private int iCondition; public int getICondition() { return iCondition; } public void setICondition(int iCondition) { this.iCondition = iCondition; } Here is the corresponding mapping: ... <property name="description"/> <property name="ends"/> <property name="iCondition" column="condition"/> <many-to-one name="seller" not-null="true"/> ... The error is: 16:01:04,634 INFO SessionFactoryImpl:119 - building session factory net.sf.hibernate.PropertyNotFoundException: Could not find a getter for iCondition in class org.hibernate.auction.AuctionItem at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182) at net.sf.hibernate.mapping.Property.getGetter(Property.java:175) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:733) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:714) at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768) at org.hibernate.auction.Main.main(Main.java:419) Exception in thread "main" When I make the property iiCondition and make getters and setters for it, it does work. It seems like the reflection part does work but the concatenating of the "get"+xxxxxx has something wrong in setting the characters to uppercase...

    Hibernate JIRA | 1 decade ago | marcel thiel
    net.sf.hibernate.PropertyNotFoundException: Could not find a getter for iCondition in class org.hibernate.auction.AuctionItem
  3. 0

    PropertyNotFoundException in Hibernate (Object Relational Mapping forum at Coderanch)

    coderanch.com | 10 months ago
    net.sf.hibernate.PropertyNotFoundException: Could not find a getter for deleteInd in class sg.gov.ciris.entity.MtUuidLink
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    dotCMS Users Group - DotCMS isnt starting: Whats wrong?

    dotcms.com | 1 year ago
    db.DotHibernate: Unable to build Session Factory
  6. 0

    Hi, In my mapping file I have a property mapped like this: <property name="tProp" type="string"/> In my java business object the property is represented as follow: private String tProp; /** * @return */ public String getTProp() { return tProp; } /** * @param string */ public void setTProp(String string) { tProp = string; } When I launch my application I got the following error: [junit] net.sf.hibernate.PropertyNotFoundException: Could not find a getter for tProp in class com.airfrance.comor.enterpriselayer.businessobject.Escale [junit] at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182) [junit] at net.sf.hibernate.mapping.Property.getGetter(Property.java:175) [junit] at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:740) [junit] at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:716) [junit] at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42) [junit] at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136) [junit] at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:791) [junit] at com.airfrance.jraf.provider.persistence.hibernate.Initializer.initialize(Initializer.java:137) I got the same error if I change the type in the mapping and in the business object class. If I change the property name to 'tprop' in the mapping file and in the business object class it works perfectly. I got the same problem in multiple environment (Wesphere 5.1, JUnit Test...). I think the bug is on hibernate side. Contact me if you need more precisions. Cordially, Eric

    Hibernate JIRA | 1 decade ago | eric bellard
    net.sf.hibernate.PropertyNotFoundException: Could not find a getter for tProp in class com.airfrance.comor.enterpriselayer.businessobject.Escale

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.hibernate.PropertyNotFoundException

      Could not find a getter for iCondition in class org.hibernate.auction.AuctionItem

      at net.sf.hibernate.property.BasicPropertyAccessor.getGetter()
    2. net.sf.hibernate
      Configuration.buildSessionFactory
      1. net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182)
      2. net.sf.hibernate.mapping.Property.getGetter(Property.java:175)
      3. net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:733)
      4. net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:714)
      5. net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42)
      6. net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
      7. net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768)
      7 frames
    3. org.hibernate.auction
      Main.main
      1. org.hibernate.auction.Main.main(Main.java:419)
      1 frame