org.hibernate.MappingException: broken column mapping for: parentStateState.state of: com.pvs.pmm.client.state.StateNodeImpl

Hibernate JIRA | ron piterman | 1 decade ago
  1. 0

    Here are the exception and the files: ( added comments on the xml to ease reading ) org.hibernate.MappingException: broken column mapping for: parentStateState.state of: com.pvs.pmm.client.state.StateNodeImpl at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:122) at org.hibernate.persister.entity.AbstractPropertyMapping.initIdentifierPropertyPaths(AbstractPropertyMapping.java:183) at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:160) at org.hibernate.persister.entity.AbstractEntityPersister.initOrdinaryPropertyPaths(AbstractEntityPersister.java:1585) at org.hibernate.persister.entity.AbstractEntityPersister.initPropertyPaths(AbstractEntityPersister.java:1613) at org.hibernate.persister.entity.AbstractEntityPersister.postConstruct(AbstractEntityPersister.java:2610) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:386) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) <class name="StateNodeState"> <composite-id name="id"> <key-many-to-one name="parentNode"/> <!-- class="StateNodeImpl" --> <key-property name="stateName"/> <!-- type="String"--> </composite-id> <one-to-one name="state" foreign-key="state" class="StateNodeImpl"/> </class> public class StateNodeState { private StateNodeStatePK id; private StateNodeImpl state; // here come setters and getters... // ... } public class StateNodeStatePK implements Serializable { private StateNodeImpl parentNode; private String stateName; // here come setters and getters... // ... } <class name="StateNodeImpl" table="StateNode"> <id name="id"> <!-- Long --> <generator class="foreign"> <param name="property">parentStateState</param> </generator> </id> <property name="stateName"/> <property name="stateValue"/> <one-to-one name="parentStateState" property-ref="state"/> <!-- class=StateNodeState --> <many-to-one name="parentState"/> <!-- class="StateNodeImpl" --> </class> public class StateNodeImpl { private Long id; private String stateName; private Long stateValue; private StateNodeImpl parentState; private StateNodeState parentStateState; // here comes auto generated setters and getters... // ... } --- I also tried without it without the <generator class="foreign"> and the reverse one-to-one from StateNode to StateNodeState, the result was the same.

    Hibernate JIRA | 1 decade ago | ron piterman
    org.hibernate.MappingException: broken column mapping for: parentStateState.state of: com.pvs.pmm.client.state.StateNodeImpl
  2. 0

    Here are the exception and the files: ( added comments on the xml to ease reading ) org.hibernate.MappingException: broken column mapping for: parentStateState.state of: com.pvs.pmm.client.state.StateNodeImpl at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:122) at org.hibernate.persister.entity.AbstractPropertyMapping.initIdentifierPropertyPaths(AbstractPropertyMapping.java:183) at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:160) at org.hibernate.persister.entity.AbstractEntityPersister.initOrdinaryPropertyPaths(AbstractEntityPersister.java:1585) at org.hibernate.persister.entity.AbstractEntityPersister.initPropertyPaths(AbstractEntityPersister.java:1613) at org.hibernate.persister.entity.AbstractEntityPersister.postConstruct(AbstractEntityPersister.java:2610) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:386) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) <class name="StateNodeState"> <composite-id name="id"> <key-many-to-one name="parentNode"/> <!-- class="StateNodeImpl" --> <key-property name="stateName"/> <!-- type="String"--> </composite-id> <one-to-one name="state" foreign-key="state" class="StateNodeImpl"/> </class> public class StateNodeState { private StateNodeStatePK id; private StateNodeImpl state; // here come setters and getters... // ... } public class StateNodeStatePK implements Serializable { private StateNodeImpl parentNode; private String stateName; // here come setters and getters... // ... } <class name="StateNodeImpl" table="StateNode"> <id name="id"> <!-- Long --> <generator class="foreign"> <param name="property">parentStateState</param> </generator> </id> <property name="stateName"/> <property name="stateValue"/> <one-to-one name="parentStateState" property-ref="state"/> <!-- class=StateNodeState --> <many-to-one name="parentState"/> <!-- class="StateNodeImpl" --> </class> public class StateNodeImpl { private Long id; private String stateName; private Long stateValue; private StateNodeImpl parentState; private StateNodeState parentStateState; // here comes auto generated setters and getters... // ... } --- I also tried without it without the <generator class="foreign"> and the reverse one-to-one from StateNode to StateNodeState, the result was the same.

    Hibernate JIRA | 1 decade ago | ron piterman
    org.hibernate.MappingException: broken column mapping for: parentStateState.state of: com.pvs.pmm.client.state.StateNodeImpl
  3. 0

    Context initialization failed : Error creating bean - Forums | Liferay

    liferay.com | 1 year ago
    org.springframework.beans.factory.BeanCreationException:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Context initialization failed : Error creating bean - Forums | Liferay

    liferay.com | 7 months ago
    org.springframework.beans.factory.BeanCreationException:
  6. 0

    Mapeamento entre Classe no Hibernate - Javafree: O fórum de Java que mais cresce

    com.br | 11 months ago
    org.hibernate.MappingException: persistent class not known: Endereco

    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. org.hibernate.MappingException

      broken column mapping for: parentStateState.state of: com.pvs.pmm.client.state.StateNodeImpl

      at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths()
    2. Hibernate
      SingleTableEntityPersister.<init>
      1. org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:122)
      2. org.hibernate.persister.entity.AbstractPropertyMapping.initIdentifierPropertyPaths(AbstractPropertyMapping.java:183)
      3. org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:160)
      4. org.hibernate.persister.entity.AbstractEntityPersister.initOrdinaryPropertyPaths(AbstractEntityPersister.java:1585)
      5. org.hibernate.persister.entity.AbstractEntityPersister.initPropertyPaths(AbstractEntityPersister.java:1613)
      6. org.hibernate.persister.entity.AbstractEntityPersister.postConstruct(AbstractEntityPersister.java:2610)
      7. org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:386)
      7 frames
    3. Hibernate
      PersisterFactory.createClassPersister
      1. org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
      1 frame