-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: SessionFactory creation failed:Could not find a getter
PostPosted: Wed May 24, 2006 5:03 pm 
Newbie

Joined: Fri Nov 18, 2005 1:06 pm
Posts: 15
Exception in thread "main" java.lang.ExceptionInInitializerError: SessionFactory creation failed: Could not find a getter for reporttopicdetail in class com.foursight.jobscheduler.checkplan.data.entity.Topic

Actually I used hibernate tool generated pojo and mapping file, I just can not figure out what wrong with it, any help will be appreciated?

Thanks


Code:

// Generated May 24, 2006 12:01:32 PM by Hibernate Tools 3.1.0.beta4

import java.util.HashSet;
import java.util.Set;


/**
* Topic generated by hbm2java
*/

public class Topic  implements java.io.Serializable {


    // Fields   

     private long topicid;
     private Reporttopicdetail reporttopicdetail;
     private String topictype;
     private Set jobsubscribtions = new HashSet(0);


    // Constructors

    /** default constructor */
    public Topic() {
    }

   /** minimal constructor */
    public Topic(long topicid) {
        this.topicid = topicid;
    }
   
    /** full constructor */
    public Topic(long topicid, Reporttopicdetail reporttopicdetail, String topictype, Set jobsubscribtions) {
        this.topicid = topicid;
        this.reporttopicdetail = reporttopicdetail;
        this.topictype = topictype;
        this.jobsubscribtions = jobsubscribtions;
    }
   

   
    // Property accessors

    public long getTopicid() {
        return this.topicid;
    }
   
    public void setTopicid(long topicid) {
        this.topicid = topicid;
    }

   
  public Reporttopicdetail getReporttopicdetail() {
        return this.reporttopicdetail;
    }
   
    public void setReporttopicdetail(Reporttopicdetail reporttopicdetail) {
        this.reporttopicdetail = reporttopicdetail;
    }
   

    public String getTopictype() {
        return this.topictype;
    }
   
    public void setTopictype(String topictype) {
        this.topictype = topictype;
    }

    public Set getJobsubscribtions() {
        return this.jobsubscribtions;
    }
   
    public void setJobsubscribtions(Set jobsubscribtions) {
        this.jobsubscribtions = jobsubscribtions;
    }

}




And here is the mapping file

Code:


<hibernate-mapping>
    <class name="Topic" table="topic">
        <id name="topicid" type="long">
            <column name="topicid" />
            <generator class="assigned" />
        </id>
      
        <many-to-one name="reporttopicdetail" class="Reporttopicdetail" fetch="select">
            <column name="topicdetail" />
        </many-to-one>
         
         
        <property name="topictype" type="string">
            <column name="topictype" length="10" />
        </property>
        <set name="jobsubscribtions" inverse="true">
            <key>
                <column name="topic" not-null="true" />
            </key>
            <one-to-many class="Jobsubscribtion" />
        </set>
    </class>
</hibernate-mapping>



Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 6:45 pm 
Newbie

Joined: Fri Nov 18, 2005 1:06 pm
Posts: 15
I have it fixed

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.