Wednesday, February 16, 2022

JEE, Hibernate, PostgreSQL: Caused by: org.postgresql.util.PSQLException: ERROR: must be owner of table server


 >PROBLEM


Hibernate fails when the application starts throwing the following messages:


Caused by: org.postgresql.util.PSQLException: ERROR: must be owner of table server 2022-02-16 22:18:43 # [restartedMain] # WARN  # o.h.t.s.i.ExceptionHandlerLoggedImpl # method: handleException # GenerationTarget encountered exception accepting command : 

Error executing DDL "alter table public.provider 

       add column provider_details_pk int8" via JDBC Statement

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "

    alter table public.provider 

       add column provider_details_pk int8" via JDBC Statement

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "

    alter table public.server 

       add column provider_pk int8" via JDBC Statement



>SOLUTION


The tables were create via terminal using postgres' admin account that it is now allowed to remote access due to security issues.

Drop the tables that have the owner access issue using the terminal and the admin's account, the same used to create them.

Recreate the tables using another account that has remote access priviledges.


>ENV

Debian 10
PostgreSQL 10
Windows 10


No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...