1

I'm working on Eclipse with Tomcat6 and I use PostgreSQL as database. I try to configure Tomcat6 on eclipse but it doesn't work. So I download a Tomca6 server. When I test my application I put my .war in the webapps directory on Tomcat6. But when I try to create a user in my site I always get the following error :

permission denied for the relation User.

It seems like I can't access my database from my application.

However the user name that I use to insert data has all privileges on the database.I execute a GRANT ALL privileges to user name request when I created my database.

Why do I get this error?

Here is my exception message:

Mapped "{[/getProjection/showAll/{movieId}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.util.List<com.cap.theater.common.beans.Projection> com.cap.theater.controllers.ProjectionController.showAllProjection(int,org.springframework.ui.ModelMap)
Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
FrameworkServlet 'mvc-dispatcher': initialization completed in 304 ms
An error occured while trying to list movies : ERROR: permission denied for relation movie
false
nouveaute query is : SELECT distinct movie_id FROM Projection WHERE (day > ? OR (day = ? AND "DATE" >= ?))
Listing all movies..
An error occured while trying to list movies : ERROR: permission denied for relation movie
false
nouveaute query is : SELECT distinct movie_id FROM Projection WHERE (day > ? OR (day = ? AND "DATE" >= ?))
André Laszlo
  • 15,169
  • 3
  • 63
  • 81
  • Have you made sure that the user has permission by executing the same query using a sql client? I know ive tricked myself before with permissions thinking I had them setup correctly when I didnt. PS take a look at http://stackoverflow.com/questions/15520361/permission-denied-for-relation – ug_ Jan 09 '14 at 20:53
  • thank you for the link. It is because of the permission on tables. – StackOverFlowUser Jan 09 '14 at 22:57

0 Answers0