wso2wso2-esbwso2-enterprise-integratoruser-management

Unable to add new User/Role in WSO2 EI 6.4.0 (Docker) via managemnt console


There is WSO2 EI 6.4.0 docker container running in which trying to do user management task such as adding new role,adding new user, assign role to newly created user etc

When i try to add new role/listing role, it is not even shows default role such as admin or internal/everyone below ERROR got in console

Error while listing roles. Error: Cannot change transaction isolation level in the middle of a transaction.

console error

WSO2 Log:

[2023-05-16 12:32:41,412] [-1234] [] [http-nio-9443-exec-35] ERROR {org.wso2.carbon.user.mgt.ui.UserStoreCountClient} -  Cannot change transaction isolation level in the middle of a transaction.
org.wso2.carbon.identity.user.store.count.stub.UserStoreCountServiceUserStoreCounterException: UserStoreCountServiceUserStoreCounterException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.wso2.carbon.identity.user.store.count.stub.UserStoreCountServiceStub.countRoles(UserStoreCountServiceStub.java:617)

When i try to add new user, below ERROR i got.

Error while loading roles. Error: Error occurred while getting hybrid roles from filter : %

user console error

WSo2 Log:

[2023-05-16 12:34:22,826] [-1234] [] [http-nio-9443-exec-19] ERROR {org.wso2.carbon.user.mgt.UserRealmProxy} -  org.wso2.carbon.user.core.UserStoreException: Error occurred while getting hybrid roles from filter : %
[2023-05-16 12:34:22,830] [-1234] [] [http-nio-9443-exec-19] ERROR {org.wso2.carbon.user.mgt.ui.UserAdminClient} -  Error occurred while getting hybrid roles from filter : %
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException: UserAdminUserAdminException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.wso2.carbon.user.mgt.stub.UserAdminStub.getRolesOfUser(UserAdminStub.java:2555)
        at org.wso2.carbon.user.mgt.ui.UserAdminClient.getRolesOfUser(UserAdminClient.java:154)
        at org.apache.jsp.user.add_002dstep2_jsp._jspService(add_002dstep2_jsp.java:245)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

Note:

DBMS: `PostgreSQL`
DBMS Version: `12.11`
DBMS Driver: `PostgreSQL JDBC Driver`
DBMS Driver Version: `42.2.2`

How to resolve this issue?


Solution

  • Try adding the following to your DataSource config. This issue is reported here.

    <testOnBorrow>true</testOnBorrow>
    <validationQuery>SELECT 1; COMMIT</validationQuery>
    <defaultAutoCommit>false</defaultAutoCommit>
    <commitOnReturn>true</commitOnReturn>
    <rollbackOnReturn>false</rollbackOnReturn>