Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Stimulsoft Reports.JAVA discussion
Post Reply
evmcl
Posts: 5
Joined: Wed Dec 09, 2020 5:19 am

Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Post by evmcl »

Using a connection string like:

Code: Select all

Server=localhost; Port=5432; Database=mydb; UserId=postgres; Password=redacted;
Which works with older versions of Stimulsoft, but from version 2023.2.3 onwards we get an exception as follows.

Code: Select all

java.lang.RuntimeException: FATAL: password authentication failed for user "postgres"
StiJDBCDatabase [promptUserNameAndPassword=false, url=jdbc:postgresql://localhost:5432mydb, user=postgres, password=****, driver=org.postgresql.Driver, other={}]] with root cause

org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:646) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:180) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.Driver.makeConnection(Driver.java:402) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.Driver.connect(Driver.java:261) ~[postgresql-42.3.8.jar:42.3.8]
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) ~[java.sql:na]
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190) ~[java.sql:na]
at com.stimulsoft.report.dictionary.databases.StiJDBCDatabase.connect(StiJDBCDatabase.java:311) ~[stimulsoft-reports-report-2023.2.3.jar:na]
at com.stimulsoft.report.dictionary.dataSources.StiDataStoreSource.connect(StiDataStoreSource.java:114) ~[stimulsoft-reports-report-2023.2.3.jar:na]
at com.stimulsoft.report.dictionary.dataSources.StiDataSourcesCollection.connect(StiDataSourcesCollection.java:159) ~[stimulsoft-reports-report-2023.2.3.jar:na]
...
Using the Postgresql JDBC driver version 42.6.0 (not that I expect that is a factor).
Max Shamanov
Posts: 794
Joined: Tue Sep 07, 2021 10:11 am

Re: Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Vadim
Posts: 363
Joined: Tue Apr 23, 2013 11:23 am

Re: Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Post by Vadim »

Hello.

This bug will be fixed in next version, for workaround please remove last semicolon in connection string.
Post Reply