Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 566869FA306 for ; Mon, 5 Feb 2007 12:38:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 76265-01 for ; Mon, 5 Feb 2007 12:37:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by postgresql.org (Postfix) with ESMTP id 9DE919FA177 for ; Mon, 5 Feb 2007 12:37:49 -0400 (AST) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HE6qi-0003If-TI for pgsql-jdbc@postgresql.org; Mon, 05 Feb 2007 08:37:48 -0800 Message-ID: <8809786.post@talk.nabble.com> Date: Mon, 5 Feb 2007 08:37:48 -0800 (PST) From: shahab To: pgsql-jdbc@postgresql.org Subject: is not mapped MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: smahtab@pershing.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/32 X-Sequence-Number: 16588 Hi: I am trying to use access table in postgress database using hibernate. (similar to tutirial at http://cwiki.apache.org/S2WIKI/struts-2-spring-jpa-ajax.html). I am getting the following error - SEVERE: Could not execute action java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: tmsuser is not mapped [select t.id, t.us erid, t.password from tmsuser t] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616) My table is set up as follows - CREATE TABLE TMSUSER ( id BIGSERIAL NOT NULL, userid VARCHAR(8) NOT NULL CHECK (userid <> ''), password VARCHAR(8) NOT NULL CHECK (password <> ''), PRIMARY KEY (id) ); My Model file is as follows - @Entity public class TMSUser { @Id @GeneratedValue private Integer id; private String userid; private String password; The query in service file is as follows - Query query = getEntityManager().createQuery("select t.id, t.userid, t.password from tmsuser t"); I would greatly appreaciate yore help. thanx Shahab -- View this message in context: http://www.nabble.com/%3Ctable-name%3E-is-not-mapped-tf3175392.html#a8809786 Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.