[Registry-dev] [jira] Created: (REGISTRY-185) Incorrect error when
adding the same role twice
Yumani Ranaweera (JIRA)
jira at wso2.org
Tue Feb 5 02:04:59 PST 2008
Incorrect error when adding the same role twice
-----------------------------------------------
Key: REGISTRY-185
URL: http://wso2.org/jira/browse/REGISTRY-185
Project: WSO2 Registry
Issue Type: Bug
Environment: WinXp, JDK1.5, FF
Reporter: Yumani Ranaweera
Assigned To: Chathura Ekanayake
Steps:
-------
1. Login as admin
2. Add a person
3. Assign him admin role
4. Assign the admin role again
It gives an error message as below;
Could not add the user yumani to the role admin. Caused by: Error adding user to role. Violation of unique constraint SYS_CT_144: duplicate value(s) for column(s) $$ in statement [insert into um_user_roles (id, user_id, role_id) values (?, ?, ?)]
********** Its more infomative if you say "The role is already assigned". Also can we NOT have the 'Caused by: details of the error in the UI.
FYI - the stack trace of the error is as below;
org.wso2.registry.RegistryException: Could not add the user yum to the role admin. Caused by: Error adding user to role. Violation of unique constrain
t SYS_CT_144: duplicate value(s) for column(s) $$ in statement [insert into um_user_roles (id, user_id, role_id) values (?, ?, ?)]
at org.wso2.registry.web.actions.AddUserRoleAction.execute(AddUserRoleAction.java:46)
at org.wso2.registry.web.ControllerServlet.doPost(ControllerServlet.java:295)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the Registry-dev
mailing list