Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Default org.hibernate.MappingException: component class not found: IssueMasterHasIssueStatusI

    hibernate.cfg.xml ----->>


    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.bytecode.use_reflection_optimizer" >false</property>
    <property name="hibernate.connection.driver_class">com.mysql .jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/issuetracker</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.dialect">org.hibernate.dialect.MyS QLDialect</property>
    <property name="hibernate.search.autoregister_listeners">fal se</property>

    <mapping resource="IssueMaster.hbm.xml" />
    <mapping resource="IssueMasterHasIssueStatus.hbm.xml" />
    <mapping resource="IssueStatus.hbm.xml" />


    </session-factory>
    </hibernate-configuration>



    IssueStatus.hbm.xml ----->>

    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <!-- Generated Sep 11, 2013 4:39:06 PM by Hibernate Tools 3.4.0.CR1 -->
    <hibernate-mapping>
    <class name="IssueStatus" table="Issue_Status" catalog="issuetracker">
    <id name="statusId" type="int">
    <column name="status_ID" length="4" />
    <generator class="native" />
    </id>
    <property name="statusDetail" type="string">
    <column name="status_DETAIL" length="45" />
    </property>
    <set name="issueMasterHasIssueStatuses" table="Issue_Master_has_Issue_Status" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Status_status_ID" not-null="true" />
    </key>
    <one-to-many class="IssueMasterHasIssueStatus" />
    </set>

    </class>
    </hibernate-mapping>


    IssueMaster.hbm.xml ---->>

    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <!-- Generated Sep 11, 2013 4:39:06 PM by Hibernate Tools 3.4.0.CR1 -->
    <hibernate-mapping>
    <class name="IssueMaster" table="Issue_Master" catalog="issuetracker">
    <id name="ticketId" type="int">
    <column name="ticket_ID" length="4" />
    <generator class="native" />
    </id>
    <many-to-one name="companyIssuesCategory" class="CompanyIssuesCategory" fetch="select">
    <column name="Company_Issues_Category_category_ID" not-null="true" />
    </many-to-one>
    <property name="ticketTitle" type="string">
    <column name="ticket_TITLE" length="100" />
    </property>
    <property name="startDate" type="date">
    <column name="start_DATE" length="10" />
    </property>
    <set name="issueMasterHasEmployeeDetailses" table="Issue_Master_has_Employee_Details" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </key>
    <one-to-many class="IssueMasterHasEmployeeDetails" />
    </set>
    <set name="issueMasterHasIssueSeverities" table="Issue_Master_has_Issue_Severity" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </key>
    <one-to-many class="IssueMasterHasIssueSeverity" />
    </set>
    <set name="issueLongDescriptions" table="Issue_Long_Description" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </key>
    <one-to-many class="IssueLongDescription" />
    </set>
    <set name="issueAttachments" table="Issue_Attachment" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" />
    </key>
    <one-to-many class="IssueAttachment" />
    </set>
    <set name="issueMasterHasIssueStatuses" table="Issue_Master_has_Issue_Status" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </key>
    <one-to-many class="IssueMasterHasIssueStatus" />
    </set>

    <set name="issueShortDescriptions" table="Issue_Short_Description" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </key>
    <one-to-many class="IssueShortDescription" />
    </set>
    <set name="issueCommentses" table="Issue_Comments" inverse="true" lazy="true" fetch="select">
    <key>
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </key>
    <one-to-many class="IssueComments" />
    </set>
    </class>
    </hibernate-mapping>



    IssueMasterHasIssueStatus.hbm.xml ----->>>

    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <!-- Generated Sep 11, 2013 4:39:06 PM by Hibernate Tools 3.4.0.CR1 -->
    <hibernate-mapping>
    <class name="IssueMasterHasIssueStatus" table="Issue_Master_has_Issue_Status" catalog="issuetracker">
    <composite-id name="id" class="IssueMasterHasIssueStatusId">
    <key-property name="issueMasterTicketId" type="int">
    <column name="Issue_Master_ticket_ID" />
    </key-property>
    <key-property name="issueStatusStatusId" type="int">
    <column name="Issue_Status_status_ID" />
    </key-property>
    <key-property name="statusUpdatedDatetime" type="timestamp">
    <column name="status_updated_DATETIME" length="19" />
    </key-property>
    </composite-id>

    <many-to-one name="issueMaster" class="IssueMaster" update="false" insert="false" fetch="select">
    <column name="Issue_Master_ticket_ID" not-null="true" />
    </many-to-one>
    <many-to-one name="issueStatus" class="IssueStatus" update="false" insert="false" fetch="select">
    <column name="Issue_Status_status_ID" not-null="true" />
    </many-to-one>
    </class>
    </hibernate-mapping>




    Error on console ----->>>


    org.hibernate.MappingException: component class not found: IssueMasterHasIssueStatusId

    at org.hibernate.mapping.Component.getComponentClass( Component.java:104)
    at org.hibernate.tuple.component.PojoComponentTuplize r.buildGetter(PojoComponentTuplizer.java:133)
    at org.hibernate.tuple.component.AbstractComponentTup lizer.<init>(AbstractComponentTuplizer.java:43)
    at org.hibernate.tuple.component.PojoComponentTuplize r.<init>(PojoComponentTuplizer.java:38)
    at org.hibernate.tuple.component.ComponentEntityModeT oTuplizerMapping.<init>(ComponentEntityModeToTupli zerMapping.java:52)
    at org.hibernate.tuple.component.ComponentMetamodel.< init>(ComponentMetamodel.java:50)
    at org.hibernate.mapping.Component.buildType(Componen t.java:152)
    at org.hibernate.mapping.Component.getType(Component. java:145)
    at org.hibernate.mapping.SimpleValue.isValid(SimpleVa lue.java:253)
    at org.hibernate.mapping.RootClass.validate(RootClass .java:193)
    at org.hibernate.cfg.Configuration.validate(Configura tion.java:1102)
    at org.hibernate.cfg.Configuration.buildSessionFactor y(Configuration.java:1287)
    at p1.MyAction.main(MyAction.java:51)
    Caused by: java.lang.ClassNotFoundException: IssueMasterHasIssueStatusId
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:4 24)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 57)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at org.hibernate.util.ReflectHelper.classForName(Refl ectHelper.java:100)
    at org.hibernate.mapping.Component.getComponentClass( Component.java:101)
    ... 12 more
    Exception in thread "main" java.lang.NullPointerException
    at p1.MyAction.main(MyAction.java:128)








    p1.MyAction is working fine so I guess there is no need to mention its code here.......

    Do I need to edit my hibernate.cfg.xml file ??
    Or
    I does it require any other solution....?
    or
    something else ..??


    Please help me with the solution.......

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,773
    Rep Power
    5

    Default Re: org.hibernate.MappingException: component class not found: IssueMasterHasIssueSta

    You have to listen to what Hibernate is telling you - it can't find your IssueMasterHasIssueStatusId class, which basically means that the Java runtime can't find it for Hibernate. Does it actually exist as an actual class, and not an inner class? Is the name exactly the same as you put in your configuration?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 8
    Last Post: 03-27-2013, 09:30 AM
  2. Class not found exception for the servlet class.
    By mazem in forum Java Servlet
    Replies: 2
    Last Post: 08-24-2011, 09:20 AM
  3. Replies: 1
    Last Post: 06-21-2011, 12:50 PM
  4. MappingException: Named query not known :
    By abhibh_1 in forum Web Frameworks
    Replies: 0
    Last Post: 08-14-2007, 12:59 PM
  5. Hibernate table not found
    By orchid in forum JDBC
    Replies: 2
    Last Post: 05-06-2007, 07:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •