aspose file tools*
The moose likes Object Relational Mapping and the fly likes org.hibernate.MappingException: component class not found: IssueMasterHasIssueStatusId Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.hibernate.MappingException: component class not found: IssueMasterHasIssueStatusId " Watch "org.hibernate.MappingException: component class not found: IssueMasterHasIssueStatusId " New topic
Author

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

Rajat Nigam
Greenhorn

Joined: Jul 03, 2013
Posts: 7
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.MySQLDialect</property>
<property name="hibernate.search.autoregister_listeners">false</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.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:133)
at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:43)
at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:38)
at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:52)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:50)
at org.hibernate.mapping.Component.buildType(Component.java:152)
at org.hibernate.mapping.Component.getType(Component.java:145)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.RootClass.validate(RootClass.java:193)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(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.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.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.......






 
It is sorta covered in the JavaRanch Style Guide.
 
subject: org.hibernate.MappingException: component class not found: IssueMasterHasIssueStatusId