Does BPS in WSO2 Identity Server 6.1.0 need to be installed in a separate PostgreSQL database?

71 views Asked by At

I installed postgres 14 and ran the 4 WSO2 Identity Server scripts:

<IS-HOME>/dbscripts/identity/postgresql.sql
<IS-HOME>/dbscripts/consent/postgresql.sql

/dbscripts/postgresql.sql and /dbscripts/bps/bpel/create/postgresql.sql

I created a user and a database and the scripts were all applied within the same database.

The wso2 application has been installed and configured according to the 6.1.0 documentation . It goes up, however, it shows the warning below and in the database log it shows the information: 2023-05-25 10:04:50.565 EDT [361255] ERROR: current transaction is aborted, commands ignored until end of transaction block 2023-05-25 10:04:50,565 EDT [361255] STATEMENT: SELECT pg_get_serial_sequence($1, $2)

Is it necessary to install BPS in a separate database?

[2023-05-24 13:27:06,479] [] WARN {openjpa.jdbc.JDBC} - Unable to determine which sequences are owned by the database. OpenJPA will consider all sequences suffixed with "_seq" as database managed. This may result in improper creation or removal of sequences with this suffix. The original PostgreSQL driver exception is being logged for your reference. org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block {prepstmnt 282433064 SELECT pg_get_serial_sequence(?, ?) [params=?, ?]} [code=0, state=25P02] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:247) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:223) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:72) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.execute(LoggingConnectionDecorator.java:1258) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:367) at org.apache.openjpa.jdbc.sql.PostgresDictionary.queryOwnership(PostgresDictionary.java:465) at org.apache.openjpa.jdbc.sql.PostgresDictionary.isOwnedSequence(PostgresDictionary.java:430) at org.apache.openjpa.jdbc.sql.PostgresDictionary.isSystemSequence(PostgresDictionary.java:396) at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSequences(SchemaGenerator.java:960) at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchema(SchemaGenerator.java:367) at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchemas(SchemaGenerator.java:300) at org.apache.openjpa.jdbc.schema.SchemaTool.getDBSchemaGroup(SchemaTool.java:1166) at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:366) at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:343) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:505) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:455) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:160) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:164) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:122)

I changed the bps configuration.Configurations Changed in :repository/conf/deployment.toml : defaultAutoCommit="true"

if I run the bps script in a database separate from the other scripts, the error is not displayed

2023-05-29 07:07:23.706 EDT [428497] ERROR: relation "um" does not exist 2023-05-29 07:07:23.706 EDT [428497] STATEMENT: SELECT pg_get_serial_sequence($1, $2) 2023-05-29 07:07:23.707 EDT [428497] ERROR: relation "um_group" does not exist 2023-05-29 07:07:23.707 EDT [428497] STATEMENT: SELECT pg_get_serial_sequence($1, $2) 2023-05-29 07:07:23.707 EDT [428497] ERROR: relation "um_group_uuid" does not exist

1

There are 1 answers

0
Thumilan On

Is it necessary to install BPS in a separate database?

No, it is not necessary to have a separate database for BPS. By default, WSO2 products share a common database referred to as the WSO2 Carbon database.

The warning you get due to Postgresql autocommit behaviour. You can resolve it by

[bps_database.config.pool_options]
defaultAutoCommit=true

in the deployment.toml file.

There is already an issue with this, but it seems the doc is not updated. Will look into that.