Loading ...
Sorry, an error occurred while loading the content.
 

A newbie

Expand Messages
  • Hau Hau
    Hi all, I m a newbie in java programming. I tried to develop an application using netbeans IDE, with hibernate and firebird 1.5 database. I used jaybird JDBC
    Message 1 of 2 , May 12, 2008
      Hi all,

      I'm a newbie in java programming. I tried to develop an application using netbeans IDE, with hibernate and firebird 1.5 database. I used jaybird JDBC 2.1 driver.
      But it didn't work, and the problem was my entity class could not be mapped to the table.

      Below is the error message (I tried to invoke c.getAll() method where c instance of Customer and getAll method's supposed to return list of customers):
      Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Customer is not mapped [from Customer c]
      at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:634)
      at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95)


      Could anyone please tell me how to solve this problem? Thank you.


      Indra

      ---------------------------------
      Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

      [Non-text portions of this message have been removed]
    • Roman Rokytskyy
      ... Your application is missing the mapping for the class Customer. If you use Hibernate with .hbm.xml files, ensure that your Customer.hbm.xml is mapped in
      Message 2 of 2 , May 12, 2008
        > I'm a newbie in java programming. I tried to develop an application using netbeans IDE, with hibernate and firebird 1.5 database. I used jaybird JDBC 2.1 driver.
        > But it didn't work, and the problem was my entity class could not be mapped to the table.
        >
        > Below is the error message (I tried to invoke c.getAll() method where c instance of Customer and getAll method's supposed to return list of customers):
        > Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Customer is not mapped [from Customer c]
        > at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:634)
        > at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95)
        >
        >
        > Could anyone please tell me how to solve this problem? Thank you.

        Your application is missing the mapping for the class Customer. If you
        use Hibernate with .hbm.xml files, ensure that your Customer.hbm.xml is
        mapped in the hibernate.cfg.xml. If you use annotations, check the
        Hibernate configuration.

        I am pretty sure that it has nothing to do with Jaybird/Firebird...

        Roman
      Your message has been successfully submitted and would be delivered to recipients shortly.