From smahtab@pershing.com Mon Feb 5 16:38:00 2007 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. From tamir@imp.univie.ac.at Tue Feb 6 09:03:32 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8A7599FA19A for ; Tue, 6 Feb 2007 05:03:32 -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 38474-01 for ; Tue, 6 Feb 2007 05:03:28 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id BFFDC9FA312 for ; Tue, 6 Feb 2007 05:03:27 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HEMEW-0000Sz-09 for pgsql-jdbc@postgresql.org; Tue, 06 Feb 2007 10:03:24 +0100 Received: from mordor.imp.ac.at ([193.171.188.3]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Feb 2007 10:03:23 +0100 Received: from tamir by mordor.imp.ac.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Feb 2007 10:03:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: "Ido M. Tamir" Subject: Re:
is not mapped Date: Tue, 06 Feb 2007 10:03:01 +0100 Lines: 35 Message-ID: References: <8809786.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: mordor.imp.ac.at User-Agent: KNode/0.10.4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/33 X-Sequence-Number: 16589 shahab wrote: > > 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 > > > My Model file is as follows - > @Entity > public class TMSUser { > @Id > @GeneratedValue > private Integer id; > private String userid; > private String password; > You have to go to the hibernate forum at hibernate.org. But I think your problem is that class names are case sensitive in HQL: select t.id, t.userid, t.password from TMSUser t HTH ido