• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could it be case sensitive. Meaning "cabin" does not equal "CABIN"?

Mark
 
author & internet detective
Posts: 42151
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic