wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes org. postgresql. util. PSQLException: ERROR: relation does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org. postgresql. util. PSQLException: ERROR: relation does not exist" Watch "org. postgresql. util. PSQLException: ERROR: relation does not exist" New topic
Author

org. postgresql. util. PSQLException: ERROR: relation does not exist

Ovidiu Stanciu
Greenhorn

Joined: Oct 23, 2007
Posts: 2
Hello.

I'm trying to set up a simple EJB3 example using JBoss 4.2.1 JPA and a PostgreSQL 8.2 server.

I have a DB named cruise_test and a table CABIN for which i'm trying to create an entity.

I created a session bean which runs a native query to get all cabins.

The error is
org.postgresql.util.PSQLException: ERROR: relation "cabin" does not exist

Consider the following listings:

The Cabin Entity:



The Session Bean:



persistence.xml :


The Datasource


SQL Table creation script


Any help would be great. Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Could it be case sensitive. Meaning "cabin" does not equal "CABIN"?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Bumping this thread because I found it in a search as I was looking for the same error message.

In postgres, tables are considered lowercase unless you use quotes. So yes, Mark is correct. (My problem was that I hadn't loaded the DDL I thought I did.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org. postgresql. util. PSQLException: ERROR: relation does not exist
 
Similar Threads
EJB3 Entity Bean won't verify with Netbeans
NameNotFoundExcption
Jboss-seam EJB 3.0 "not bound" error.....
Issue with JPA + MySQL
TestEJB not bound