Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while unsharing application in MySQL databse #17403

Closed
PasinduYeshan opened this issue Oct 30, 2023 · 1 comment
Closed

Error while unsharing application in MySQL databse #17403

PasinduYeshan opened this issue Oct 30, 2023 · 1 comment

Comments

@PasinduYeshan
Copy link
Contributor

Describe the issue:
Error occurs while unshare application.

Caused by: org.wso2.carbon.identity.application.common.IdentityApplicationManagementException: Error occurred while deleting roles created for the application: app1.
	at org.wso2.carbon.identity.application.mgt.listener.DefaultRoleManagementListener.doPostDeleteApplication(DefaultRoleManagementListener.java:550)
	at org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl.deleteApplication(ApplicationManagementServiceImpl.java:810)
	at org.wso2.carbon.identity.organization.management.application.OrgApplicationManagerImpl.deleteSharedApplication(OrgApplicationManagerImpl.java:304)
	... 59 more
Caused by: org.wso2.carbon.identity.role.v2.mgt.core.exception.IdentityRoleManagementServerException: Error while deleting roles by app id : b3c9a1f0-5dd0-4ef9-bf7b-cadc6a842000
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteRolesByApplication(RoleDAOImpl.java:1055)
	at org.wso2.carbon.identity.role.v2.mgt.core.RoleManagementServiceImpl.deleteRolesByApplication(RoleManagementServiceImpl.java:570)
	at org.wso2.carbon.identity.application.mgt.listener.DefaultRoleManagementListener.doPostDeleteApplication(DefaultRoleManagementListener.java:547)
	... 61 more
Caused by: org.wso2.carbon.identity.role.v2.mgt.core.exception.IdentityRoleManagementServerException: Error while deleting the role: Internal/ebdf6574-06b0-441d-a32f-693d0308f7a7 for the role: Internal/ebdf6574-06b0-441d-a32f-693d0308f7a7 in the tenantDomain: 5869c441-0c49-4501-aa06-d9d0cb3bdf36
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteSCIMRole(RoleDAOImpl.java:2997)
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteRolesByApplication(RoleDAOImpl.java:1048)
	... 63 more
Caused by: org.wso2.carbon.identity.role.v2.mgt.core.exception.IdentityRoleManagementServerException: Error while deleting permissions to roleId : appRole1
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteAllPermissionsOfRole(RoleDAOImpl.java:1630)
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteRoleAssociations(RoleDAOImpl.java:1286)
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteSCIMRole(RoleDAOImpl.java:2990)
	... 64 more
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ROLE_ID = 'appRole1'' at line 1
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
	at jdk.internal.reflect.GeneratedMethodAccessor143.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.$Proxy55.executeUpdate(Unknown Source)
	at org.wso2.carbon.database.utils.jdbc.NamedPreparedStatement.executeUpdate(NamedPreparedStatement.java:252)
	at org.wso2.carbon.identity.role.v2.mgt.core.dao.RoleDAOImpl.deleteAllPermissionsOfRole(RoleDAOImpl.java:1627)
	... 66 more

How to reproduce:

Expected behavior:

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

  • Product Version: [e.g., IS 5.10.0, IS 5.9.0]
  • OS: [e.g. Mac]
  • Database: [e.g., MySQL ]
  • Userstore: [e.g., LDAP, JDBC]

Optional Fields

Related issues:

Suggested labels:

@PasinduYeshan
Copy link
Contributor Author

This issue is fixed with wso2/carbon-identity-framework#5115.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants