IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Hibernate Java Discussion :

PropertyNotFoundException: Could not find a getter for


Sujet :

Hibernate Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Inscrit en
    Mai 2002
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Mai 2002
    Messages : 219
    Par défaut PropertyNotFoundException: Could not find a getter for
    bonjour j ai un petit probleme. J utilise hibernateSynchronizer3
    pour genere mes hbm.

    mais mon compilateur ne voit pas les getters et setters qui commence par un l minuscule
    bizzare quand meme.
    mon hbm
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    	"-//Hibernate/Hibernate Mapping DTD//EN"
    	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
    
    <hibernate-mapping package="pojo">
    	<class
    		name="PpoAtraiterPojo"
    		table="PPO_ATRAITER"
    	>
    		<id
    			name="idPpoNtraite"
    			column="ID_PPO_NTRAITE"
    			type="integer"
    			length="6"
    		>
    		
    			<generator class="assigned"/>
    		</id>
    		<property
    			name="ligneQualifier"
    			column="LGN_QUALIFIER"
    			type="string"
    			not-null="false"
    			length="2"
    		/>
    		<property
    			name="cntl"
    			column="CLM_CNTL"
    			type="string"
    			not-null="false"
    			length="17"
    		/>
    		<property
    			name="ligneProvider"
    			column="LGN_PROVIDER"
    			type="string"
    			not-null="false"
    			length="6"
    		/>
    		<property
    			name="disp"
    			column="CLM_DISP"
    			type="string"
    			not-null="false"
    			length="2"
    		/>
    		<property
    			name="lAllowable"
    			column="LGN_ALLOWABLE"
    			type="big_decimal"
    			not-null="false"
    			length="9"
    		/>
    	
    
    
    	</class>
    </hibernate-mapping>
    pojo
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
     
     
    package pojo;
     
    import java.io.Serializable;
    import java.math.BigDecimal;
     
    public class PpoAtraiterPojo implements Serializable, InterfacePojo {
     
    	private static final long serialVersionUID = 7127703723951922317L;
     
    	// primary key
    	private Integer idPpoNtraite;
     
    	// fields
    	private String ligneQualifier;
     
    	private String cntl;
     
    	private String ligneProvider;
     
    	private String disp;
     
    	private BigDecimal lAllowable;
     
     
     
    	/* [CONSTRUCTOR MARKER BEGIN] */
    	public PpoAtraiterPojo() {
    		super();
    	}
     
    	/**
             * Constructor for primary key
             */
    	public PpoAtraiterPojo(Integer idPpoNtraite) {
    		this.idPpoNtraite = idPpoNtraite;
    	}
     
    	public String getCntl() {
    		return cntl;
    	}
     
    	public void setCntl(String cntl) {
    		this.cntl = cntl;
    	}
     
    	public String getDisp() {
    		return disp;
    	}
     
    	public void setDisp(String disp) {
    		this.disp = disp;
    	}
     
    	public Integer getIdPpoNtraite() {
    		return idPpoNtraite;
    	}
     
    	public void setIdPpoNtraite(Integer idPpoNtraite) {
    		this.idPpoNtraite = idPpoNtraite;
    	}
     
    	public BigDecimal getLAllowable() {
    		return lAllowable;
    	}
     
    	public void setLAllowable(BigDecimal allowable) {
    		lAllowable = allowable;
    	}
     
    	public String getLProvider() {
    		return lProvider;
    	}
     
    	public void setLigneProvider(String lProvider) {
    		this.lProvider = ligneProvider;
    	}
     
    	public String getLQualifier() {
    		return ligneQualifier;
    	}
     
    	public void setLQualifier(String ligneQualifier) {
    		this.lQualifier = ligneQualifier;
    	}
    donc pour mes champs qui commencent par un l minuscule
    j ai comme errreurs
    Initial SessionFactory creation failed.org.hibernate.PropertyNotFoundException: Could not find a getter for lAllowable in class pojo.PpoAtraiterPojo
    et quand je change
    ex lAllowable par ligneAllowable ca passe
    tres bizarre quand meme tout ca
    est ce qu il y a une personne qui peut m explique ce qui se passe merci

  2. #2
    Membre expérimenté Avatar de ze_corsaire
    Inscrit en
    Décembre 2007
    Messages
    240
    Détails du profil
    Informations personnelles :
    Âge : 47

    Informations forums :
    Inscription : Décembre 2007
    Messages : 240
    Par défaut
    @ priori, je pense qu'il y a un pb dans le générateur (tu utilises le plugin HibernateSynchronizer ?), et d'après ce que j'ai pu voir sur un autre forum (https://forum.hibernate.org/viewtopi...&t=287&start=0), ça semble se confirmer. La génération à partir de la bdd produit des variables de type mMMMMs et un getter getMMMMMs, mais au chargement des fichiers de conf, Hibernate recherche un getter getmMMMMs (méthode Introspector.decapitalize) ...

    _______________

Discussions similaires

  1. Réponses: 4
    Dernier message: 10/04/2014, 12h29
  2. [Mapping] Erreur "Could not find a getter"
    Par janyoura dans le forum Hibernate
    Réponses: 1
    Dernier message: 12/08/2012, 11h21
  3. Could not find a getter for in class ?
    Par koukou0687 dans le forum Hibernate
    Réponses: 4
    Dernier message: 18/04/2011, 17h08
  4. Réponses: 2
    Dernier message: 12/04/2010, 17h47
  5. ADF : Could not find renderer for
    Par eric95 dans le forum JSF
    Réponses: 11
    Dernier message: 22/11/2006, 09h09

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo