net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property eMail in class com.sbs.tsw.hibernate.Usr

Hibernate JIRA | Andre Schikore | 1 decade ago
  1. 0

    I gote a table "usr" with the column "e_Mail" with following description: <property name="eMail" type="java.lang.String" column="e_mail" length="255" /> retrieving a query leads to following error: net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property eMail in class com.sbs.tsw.hibernate.Usr at net.sf.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:131) at net.sf.hibernate.mapping.Property.getSetter(Property.java:182) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:734) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:741) at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726) at com.sbs.tsw.model.HibernateUtil.<clinit>(HibernateUtil.java:28) at com.sbs.tsw.model.QuotationHandler.main(QuotationHandler.java:25) Checking this in cvs(v21final) I found following in method "private static Method setterMethod(Class theClass, String propertyName)"(line 159) : String testStdMethod = Introspector.decapitalize( methodName.substring(3) ); This returns "EMail" in testStdMethod when methodName="setEMail" !!! I would expect "eMail" and when I changed this to something like: String testStdMethod = methodName.substring(3,4).toLowerCase()+methodName.substring(4); everything works fine ?! So what is Introspector.decapitalize doing here?

    Hibernate JIRA | 1 decade ago | Andre Schikore
    net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property eMail in class com.sbs.tsw.hibernate.Usr
  2. 0

    I gote a table "usr" with the column "e_Mail" with following description: <property name="eMail" type="java.lang.String" column="e_mail" length="255" /> retrieving a query leads to following error: net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property eMail in class com.sbs.tsw.hibernate.Usr at net.sf.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:131) at net.sf.hibernate.mapping.Property.getSetter(Property.java:182) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:734) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:741) at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726) at com.sbs.tsw.model.HibernateUtil.<clinit>(HibernateUtil.java:28) at com.sbs.tsw.model.QuotationHandler.main(QuotationHandler.java:25) Checking this in cvs(v21final) I found following in method "private static Method setterMethod(Class theClass, String propertyName)"(line 159) : String testStdMethod = Introspector.decapitalize( methodName.substring(3) ); This returns "EMail" in testStdMethod when methodName="setEMail" !!! I would expect "eMail" and when I changed this to something like: String testStdMethod = methodName.substring(3,4).toLowerCase()+methodName.substring(4); everything works fine ?! So what is Introspector.decapitalize doing here?

    Hibernate JIRA | 1 decade ago | Andre Schikore
    net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property eMail in class com.sbs.tsw.hibernate.Usr
  3. 0

    PropertyNotFoundException in Hibernate (Object Relational Mapping forum at Coderanch)

    coderanch.com | 7 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 | 11 months ago
    db.DotHibernate: Unable to build Session Factory
  6. 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

    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 setter for property eMail in class com.sbs.tsw.hibernate.Usr

      at net.sf.hibernate.property.BasicPropertyAccessor.getSetter()
    2. net.sf.hibernate
      Configuration.buildSessionFactory
      1. net.sf.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:131)
      2. net.sf.hibernate.mapping.Property.getSetter(Property.java:182)
      3. net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:734)
      4. net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:741)
      5. net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
      6. net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136)
      7. net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726)
      7 frames
    3. com.sbs.tsw
      QuotationHandler.main
      1. com.sbs.tsw.model.HibernateUtil.<clinit>(HibernateUtil.java:28)
      2. com.sbs.tsw.model.QuotationHandler.main(QuotationHandler.java:25)
      2 frames