wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 727 forks source link

[Oracle Rac]Getting an error upon starting with Oracle RAC Database #21618

Open asekawa opened 2 days ago

asekawa commented 2 days ago

Describe the issue:

Getting an error upon starting with Oracle RAC Database

Caused by: java.sql.SQLException: ORA-12899: value too large for column "ADMIN"."IDN_XACML_POLICY"."IS_IN_PAP" (actual: 4, maximum: 1)

https://docs.oracle.com/error-help/db/ora-12899/
    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:709)
    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:609)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1290)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:1101)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:409)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:483)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:261)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1225)
    at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1689)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1431)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3930)
    at oracle.jdbc.driver.OraclePreparedStatement.doExecuteLargeUpdate(OraclePreparedStatement.java:4123)
    at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:4104)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4086)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:993)
    at jdk.internal.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:118)
    at com.sun.proxy.$Proxy49.executeUpdate(Unknown Source)
    at org.wso2.carbon.database.utils.jdbc.NamedPreparedStatement.executeUpdate(NamedPreparedStatement.java:266)
    at org.wso2.carbon.identity.entitlement.persistence.dao.PolicyDAO.insertPolicy(PolicyDAO.java:860)
    at org.wso2.carbon.identity.entitlement.persistence.dao.PolicyDAO.insertPolicy(PolicyDAO.java:122)
    ... 168 more
Caused by: Error : 12899, Position : 213, SQL = INSERT INTO IDN_XACML_POLICY (POLICY_ID, VERSION,  IS_IN_PDP, IS_IN_PAP, POLICY, IS_ACTIVE, POLICY_TYPE, POLICY_EDITOR, POLICY_ORDER, LAST_MODIFIED_TIME, LAST_MODIFIED_USER, TENANT_ID) VALUES ( :1 ,  :2 ,  :3 ,  :4 ,  :5 ,  :6 ,  :7 ,  :8 ,  :9 ,  :10 ,  :11 ,  :12 ), Original SQL = INSERT INTO IDN_XACML_POLICY (POLICY_ID, VERSION,  IS_IN_PDP, IS_IN_PAP, POLICY, IS_ACTIVE, POLICY_TYPE, POLICY_EDITOR, POLICY_ORDER, LAST_MODIFIED_TIME, LAST_MODIFIED_USER, TENANT_ID) VALUES ( ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ,  ? ), Error Message = ORA-12899: value too large for column "ADMIN"."IDN_XACML_POLICY"."IS_IN_PAP" (actual: 4, maximum: 1)

    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:717)
    ... 190 more

[2024-11-05 10:51:08,096] [] ERROR {org.wso2.carbon.identity.entitlement.EntitlementUtil} - Error while adding sample XACML policies org.wso2.carbon.identity.entitlement.EntitlementException: Error while adding or updating entitlement policy in policy store

How to reproduce:

Expected behavior:

Environment information (Please complete the following information; remove any unnecessary fields) :


Optional Fields

Related issues:

Suggested labels:

asekawa commented 17 hours ago

Even though we can access the console with the above error trace, we are facing retrieval errors in the application section

https://github.com/user-attachments/assets/59483318-b941-4635-ba5c-556e527c86f2

darshanasbg commented 17 hours ago

Can you set following configs in the deployment toml and confirm whether the errors getting solved?

[data_storage_type]
xacml = "registry"

[identity.entitlement.policy_point.pdp]
policy_finders = "org.wso2.carbon.identity.entitlement.persistence.RegistryPolicyPersistenceManager"
policy_store_module = "org.wso2.carbon.identity.entitlement.persistence.RegistryPolicyPersistenceManager"

[identity.entitlement.policy_point.pap]
status_data_handlers = "org.wso2.carbon.identity.entitlement.SimplePAPStatusDataHandler"
asekawa commented 16 hours ago

Can you set following configs in the deployment toml and confirm whether the errors getting solved?

[data_storage_type]
xacml = "registry"

[identity.entitlement.policy_point.pdp]
policy_finders = "org.wso2.carbon.identity.entitlement.persistence.RegistryPolicyPersistenceManager"
policy_store_module = "org.wso2.carbon.identity.entitlement.persistence.RegistryPolicyPersistenceManager"

[identity.entitlement.policy_point.pap]
status_data_handlers = "org.wso2.carbon.identity.entitlement.SimplePAPStatusDataHandler"

@darshanasbg Was able to resolve the startup errors[1] after applying the above-mentioned configs, however the error notification in retrieving application still persists[2]

[1]https://github.com/wso2/product-is/issues/21618#issue-2635189255 [2]https://github.com/wso2/product-is/issues/21618#issuecomment-2461852143

darshanasbg commented 13 hours ago

Can you set following configs in the deployment toml and confirm whether the errors getting solved?

[data_storage_type]
xacml = "registry"

[identity.entitlement.policy_point.pdp]
policy_finders = "org.wso2.carbon.identity.entitlement.persistence.RegistryPolicyPersistenceManager"
policy_store_module = "org.wso2.carbon.identity.entitlement.persistence.RegistryPolicyPersistenceManager"

[identity.entitlement.policy_point.pap]
status_data_handlers = "org.wso2.carbon.identity.entitlement.SimplePAPStatusDataHandler"

@darshanasbg Was able to resolve the startup errors[1] after applying the above-mentioned configs, however the error notification in retrieving application still persists[2]

This is the expected behavior as above configs applicable only to the XACML feature.. The comment [2] is related to application-mgt, which have to be sort out separately.

[1]#21618 (comment) [2]#21618 (comment)