title: org.hibernate.MappingException: Could not determine t ype for: com.yammer.dropwizard.tailor.model.CustomerModel
body: <p>I'm new to hibernate and web services and creating a project for tailor system in dropwizard.
  When i try to run the project through cmd as in <a href="http://dropwizard.codahale.com/getting-started/" rel="nofollow">DropWizard Sites</a> gets:</p>
  
  <pre><code>INFO  [2014-01-18 08:41:13,784] org.hibernate.annotations.common.Version: HCANN0
  00001: Hibernate Commons Annotations {4.0.1.Final}
  INFO  [2014-01-18 08:41:13,828] org.hibernate.Version: HHH000412: Hibernate Core
  {4.1.9.Final}
  INFO  [2014-01-18 08:41:13,847] org.hibernate.cfg.Environment: HHH000206: hibern
  ate.properties not found
  INFO  [2014-01-18 08:41:13,850] org.hibernate.cfg.Environment: HHH000021: Byteco
  de provider name : javassist
  INFO  [2014-01-18 08:41:14,076] com.yammer.dropwizard.hibernate.SessionFactoryFa
  ctory: Entity classes: [com.yammer.dropwizard.tailor.model.CoatModel, com.yammer
  .dropwizard.tailor.model.CustomerModel, com.yammer.dropwizard.tailor.model.LongS
  hirtModel, com.yammer.dropwizard.tailor.model.OrderModel, com.yammer.dropwizard.
  tailor.model.ShirtModel, com.yammer.dropwizard.tailor.model.TailorModel, com.yam
  mer.dropwizard.tailor.model.TrouserModel]
  Exception in thread "main" org.hibernate.MappingException: Could not determine t
  ype for: com.yammer.dropwizard.tailor.model.CustomerModel, at table: Order, for
  columns: [org.hibernate.mapping.Column(customer)]
      at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:314)
      at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:292)
      at org.hibernate.mapping.Property.isValid(Property.java:239)
      at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:4
  69)
      at org.hibernate.mapping.RootClass.validate(RootClass.java:270)
      at org.hibernate.cfg.Configuration.validate(Configuration.java:1294)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
   a:1742)
      at com.yammer.dropwizard.hibernate.SessionFactoryFactory.buildSessionFac
   tory(SessionFactoryFactory.java:77)
      at com.yammer.dropwizard.hibernate.SessionFactoryFactory.build(SessionFa
   ctoryFactory.java:35)
      at com.yammer.dropwizard.hibernate.HibernateBundle.run(HibernateBundle.j
  ava:38)
      at com.yammer.dropwizard.hibernate.HibernateBundle.run(HibernateBundle.j
  ava:13)
      at com.yammer.dropwizard.config.Bootstrap.runWithBundles(Bootstrap.java:
  64)
      at com.yammer.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.j
  ava:37)
      at com.yammer.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.jav
  a:58)
      at com.yammer.dropwizard.cli.Cli.run(Cli.java:53)
      at com.yammer.dropwizard.Service.run(Service.java:61)
      at com.yammer.dropwizard.tailor.service.TailorService.main(TailorService
  .java:25)
  </code></pre>
  
  <p>Classes:</p>
  
  <p>CustomerModel class:</p>
  
  <pre><code>@NamedQueries({
  @NamedQuery(
      name = "com.yammer.dropwizard.tailor.model.CustomerModel.findAll",
      query = "SELECT c FROM CustomerModel c"
  ),
  @NamedQuery(
      name = "com.yammer.dropwizard.tailor.model.CustomerModel.findById",
      query = "SELECT c FROM CustomerModel c WHERE c.ID = :ID"
  )
  })
  @Entity
  @Table(name = "Customer")
  public class CustomerModel {
  @Id
  @GeneratedValue
  @Column(name = "c_id")
  int ID;
  @Column(name = "c_code")
  String customerCode;
  @Column(name = "c_fname")
  String firstName;
  @Column(name = "c_mname")
  String middleName;
  @Column(name = "c_lname")
  String lastName;
  @Column(name = "c_nic")
  String NIC_Number;
  @Column(name = "c_email")
  String email;
  @Column(name = "c_pnumber")
  String number;
  
  
  public int getID() {
      return ID;
  }
  
  public void setID(int ID) {
      this.ID = ID;
  }
  
  public String getCustomerCode() {
      return customerCode;
  }
  
  public void setCustomerCode(String customerCode) {
      this.customerCode = customerCode;
  }
  
  public String getFirstName() {
      return firstName;
  }
  
  public void setFirstName(String firstName) {
      this.firstName = firstName;
  }
  
  public String getMiddleName() {
      return middleName;
  }
  
  public void setMiddleName(String middleName) {
      this.middleName = middleName;
  }
  
  public String getLastName() {
      return lastName;
  }
  
  public void setLastName(String lastName) {
      this.lastName = lastName;
  }
  
  public String getNIC_Number() {
      return NIC_Number;
  }
  
  public void setNIC_Number(String NIC_Number) {
      this.NIC_Number = NIC_Number;
  }
  
  public String getEmail() {
      return email;
  }
  
  public void setEmail(String email) {
      this.email = email;
  }
  
  public String getNumber() {
      return number;
  }
  
  public void setNumber(String number) {
      this.number = number;
  }}
  </code></pre>
  
  <p>which other class should i list??</p>
  
  <p>please help me.</p>
  
  <p>More class:</p>
  
  <p>Database Configuration class:</p>
  
  <pre><code>public class databaseConfiguration extends Configuration {
  
  @Valid
  @NotNull
  @JsonProperty
  DatabaseConfiguration dbconfigurations = new DatabaseConfiguration();
  
  public DatabaseConfiguration getDatabaseConfiguration() {
      return dbconfigurations;
  }
  }
  </code></pre>
  
  <p>.YML file</p>
  
  <pre><code>dbconfigurations:
  # the name of your JDBC driver
  driverClass: org.sqlite.JDBC
  
   # the username
  user:
  
  # the password
  password:
  
  url: jdbc:sqlite:TailorDB.db
  </code></pre>
  
  <p>Service Class:</p>
  
  <pre><code>public class TailorService extends Service&lt;databaseConfiguration&gt; {
  
  public static void main(String[] args) throws Exception {
      new TailorService().run(args);
  }
  private final HibernateBundle&lt;databaseConfiguration&gt; hibernate = new HibernateBundle&lt;databaseConfiguration&gt;(CustomerModel.class,OrderModel.class,CoatModel.class,LongShirtModel.class,ShirtModel.class,TailorModel.class,TrouserModel.class) {
      @Override
      public DatabaseConfiguration getDatabaseConfiguration(databaseConfiguration configuration) {
             return configuration.getDatabaseConfiguration();
      }
  };
  
  @Override
  public void initialize(Bootstrap&lt;databaseConfiguration&gt; bootstrap) {
      // TODO Auto-generated method stub
      bootstrap.setName("tailor");
      bootstrap.addBundle(hibernate);
  
  }
  
  @Override
  public void run(databaseConfiguration configuration, Environment environment)
          throws Exception {
      // TODO Auto-generated method stub
  
      final CustomerDAO cdao = new CustomerDAO(hibernate.getSessionFactory());
      final OrderDAO odao = new OrderDAO(hibernate.getSessionFactory());
      environment.addResource(new TailorResource(cdao,odao));
  
  }
  
  }
  </code></pre>