Urgent Support Need

Started by Sunil Choudharyover 4 years ago10 messagesbugs
Jump to latest
#1Sunil Choudhary
choudhary.sunil0415@gmail.com

Hi Team,

can you please support to identify the rca for below exception.

... 84 common frames omitted Caused by: org.postgresql.util.PSQLException:
ERROR: relation "templates" does not exist Position: 149 at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at
org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:150)
at
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:113)
at
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
... 115 common frames omitted

#2Dave Cramer
pg@fastcrypt.com
In reply to: Sunil Choudhary (#1)
Re: Urgent Support Need

On Fri, 20 Aug 2021 at 09:56, Sunil Choudhary <choudhary.sunil0415@gmail.com>
wrote:

Hi Team,

can you please support to identify the rca for below exception.

... 84 common frames omitted Caused by: org.postgresql.util.PSQLException:
ERROR: relation "templates" does not exist Position: 149 at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at
org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:150)
at
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:113)
at
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
... 115 common frames omitted

In order to figure out what went wrong we would need to see the query that
caused this problem.

Dave

#3Sunil Choudhary
choudhary.sunil0415@gmail.com
In reply to: Dave Cramer (#2)
Re: Urgent Support Need

is this issue coming with query only? nothing in the logs apart from this
logs.

2021-08-20 11:15:58.446 EAT [119681] db=**,user=**,app=PostgreSQL JDBC
Driver,client=***(54498) ERROR: relation "templates" does not exist at
character 149
2021-08-20 11:15:58.446 EAT [119681] db=**,user=**,app=PostgreSQL JDBC
Driver,client=***(54498) STATEMENT: select templateen0_.id as id1_3_,
templateen0_.is_active as is_activ2_3_, templateen0_.name as name3_3_,
templateen0_.template as template4_3_ from templates templateen0_ where
templateen0_.name=$1

On Fri, Aug 20, 2021 at 7:59 PM Dave Cramer <davecramer@postgres.rocks>
wrote:

Show quoted text

On Fri, 20 Aug 2021 at 09:56, Sunil Choudhary <
choudhary.sunil0415@gmail.com> wrote:

Hi Team,

can you please support to identify the rca for below exception.

... 84 common frames omitted Caused by:
org.postgresql.util.PSQLException: ERROR: relation "templates" does not
exist Position: 149 at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at
org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:150)
at
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:113)
at
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
... 115 common frames omitted

In order to figure out what went wrong we would need to see the query that
caused this problem.

Dave

#4Dave Cramer
pg@fastcrypt.com
In reply to: Sunil Choudhary (#3)
Re: Urgent Support Need

On Fri, 20 Aug 2021 at 10:43, Sunil Choudhary <choudhary.sunil0415@gmail.com>
wrote:

is this issue coming with query only? nothing in the logs apart from this
logs.

2021-08-20 11:15:58.446 EAT [119681] db=**,user=**,app=PostgreSQL JDBC
Driver,client=***(54498) ERROR: relation "templates" does not exist at
character 149
2021-08-20 11:15:58.446 EAT [119681] db=**,user=**,app=PostgreSQL JDBC
Driver,client=***(54498) STATEMENT: select templateen0_.id as id1_3_,
templateen0_.is_active as is_activ2_3_, templateen0_.name as name3_3_,
templateen0_.template as template4_3_ from templates templateen0_ where
templateen0_.name=$1

The table templates does not exist. Is it possible that you have created a
table with a MixedCase name ?

Dave

Show quoted text
#5Sunil Choudhary
choudhary.sunil0415@gmail.com
In reply to: Dave Cramer (#4)
Re: Urgent Support Need

No... table exist and it was working fine... it's giving error suddenly....
We give grant access again on db user then it work fine....any idea what
went wrong as there is no changes from our end in db.

On Fri, Aug 20, 2021, 20:20 Dave Cramer <davecramer@postgres.rocks> wrote:

Show quoted text

On Fri, 20 Aug 2021 at 10:43, Sunil Choudhary <
choudhary.sunil0415@gmail.com> wrote:

is this issue coming with query only? nothing in the logs apart from this
logs.

2021-08-20 11:15:58.446 EAT [119681] db=**,user=**,app=PostgreSQL JDBC
Driver,client=***(54498) ERROR: relation "templates" does not exist at
character 149
2021-08-20 11:15:58.446 EAT [119681] db=**,user=**,app=PostgreSQL JDBC
Driver,client=***(54498) STATEMENT: select templateen0_.id as id1_3_,
templateen0_.is_active as is_activ2_3_, templateen0_.name as name3_3_,
templateen0_.template as template4_3_ from templates templateen0_ where
templateen0_.name=$1

The table templates does not exist. Is it possible that you have created a
table with a MixedCase name ?

Dave

#6Dave Cramer
pg@fastcrypt.com
In reply to: Sunil Choudhary (#5)
Re: Urgent Support Need

On Fri, 20 Aug 2021 at 10:58, Sunil Choudhary <choudhary.sunil0415@gmail.com>
wrote:

No... table exist and it was working fine... it's giving error
suddenly.... We give grant access again on db user then it work fine....any
idea what went wrong as there is no changes from our end in db.

try connecting using psql or other tool to confirm that the table exists
and make sure you are really connecting to the database you think you are.

Clearly the table does not exist in the error message below.

Dave

Show quoted text
#7Sunil Choudhary
choudhary.sunil0415@gmail.com
In reply to: Dave Cramer (#6)
Re: Urgent Support Need

We check manually that table was exist in database on that time...there was
no changes... it's work post grant access... Is there any internal calls in
postgress?

On Fri, Aug 20, 2021, 20:32 Dave Cramer <davecramer@postgres.rocks> wrote:

Show quoted text

On Fri, 20 Aug 2021 at 10:58, Sunil Choudhary <
choudhary.sunil0415@gmail.com> wrote:

No... table exist and it was working fine... it's giving error
suddenly.... We give grant access again on db user then it work fine....any
idea what went wrong as there is no changes from our end in db.

try connecting using psql or other tool to confirm that the table exists
and make sure you are really connecting to the database you think you are.

Clearly the table does not exist in the error message below.

Dave

#8Dave Cramer
pg@fastcrypt.com
In reply to: Sunil Choudhary (#7)
Re: Urgent Support Need

On Fri, 20 Aug 2021 at 11:17, Sunil Choudhary <choudhary.sunil0415@gmail.com>
wrote:

We check manually that table was exist in database on that time...there
was no changes... it's work post grant access... Is there any internal
calls in postgress?

With what you have provided. The connection that is producing the error is
connected to a database that does not have a templates table.

Without more information there is little we can help you with.

I am not sure what you mean by "internal calls"?

Dave

Show quoted text
#9Dave Cramer
pg@fastcrypt.com
In reply to: Dave Cramer (#8)
Re: Urgent Support Need

It just occurred to me that it is also possible that the search_path may be
wrong. Again without more information it is difficult to say.

Can you try writing a small java program to test this out ?

ie

public static void main(String []args) throws Exception {

String url = "jdbc:postgresql://localhost:5432/test";

Properties props = new Properties();
props.setProperty("user", "test");
props.setProperty("password", "test");
try ( Connection conn = DriverManager.getConnection(url, props) ){
try ( Statement statement = conn.createStatement() ) {
try (ResultSet rs = statement.executeQuery( "select * from
templates ") ){
if (rs.next())
System.out.println( "Get String: " +
rs.getString(1));
}
}
}
}
}

On Fri, 20 Aug 2021 at 11:23, Dave Cramer <davecramer@postgres.rocks> wrote:

Show quoted text

On Fri, 20 Aug 2021 at 11:17, Sunil Choudhary <
choudhary.sunil0415@gmail.com> wrote:

We check manually that table was exist in database on that time...there
was no changes... it's work post grant access... Is there any internal
calls in postgress?

With what you have provided. The connection that is producing the error is
connected to a database that does not have a templates table.

Without more information there is little we can help you with.

I am not sure what you mean by "internal calls"?

Dave

#10Sunil Choudhary
choudhary.sunil0415@gmail.com
In reply to: Dave Cramer (#9)
Re: Urgent Support Need

Thanks, I'll check it out.

On Fri, Aug 20, 2021, 20:59 Dave Cramer <davecramer@postgres.rocks> wrote:

Show quoted text

It just occurred to me that it is also possible that the search_path may
be wrong. Again without more information it is difficult to say.

Can you try writing a small java program to test this out ?

ie

public static void main(String []args) throws Exception {

String url = "jdbc:postgresql://localhost:5432/test";

Properties props = new Properties();
props.setProperty("user", "test");
props.setProperty("password", "test");
try ( Connection conn = DriverManager.getConnection(url, props) ){
try ( Statement statement = conn.createStatement() ) {
try (ResultSet rs = statement.executeQuery( "select * from
templates ") ){
if (rs.next())
System.out.println( "Get String: " +
rs.getString(1));
}
}
}
}
}

On Fri, 20 Aug 2021 at 11:23, Dave Cramer <davecramer@postgres.rocks>
wrote:

On Fri, 20 Aug 2021 at 11:17, Sunil Choudhary <
choudhary.sunil0415@gmail.com> wrote:

We check manually that table was exist in database on that time...there
was no changes... it's work post grant access... Is there any internal
calls in postgress?

With what you have provided. The connection that is producing the error
is connected to a database that does not have a templates table.

Without more information there is little we can help you with.

I am not sure what you mean by "internal calls"?

Dave