[JBoss JIRA] (GTNPORTAL-3245) Add comfriming when user remove permissions on edit page & site
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3245?focusedWorklogId=12430149&... ]
Trong Tran logged work on GTNPORTAL-3245:
-----------------------------------------
Author: Trong Tran
Created on: 06/Nov/13 1:35 AM
Start Date: 06/Nov/13 1:34 AM
Worklog Time Spent: 20 minutes
Issue Time Tracking
-------------------
Remaining Estimate: 40 minutes (was: 1 hour)
Time Spent: 2 days, 3 hours, 20 minutes (was: 2 days, 3 hours)
Worklog Id: (was: 12430149)
> Add comfriming when user remove permissions on edit page & site
> ---------------------------------------------------------------
>
> Key: GTNPORTAL-3245
> URL: https://issues.jboss.org/browse/GTNPORTAL-3245
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.1.Final
> Reporter: Hai Nguyen
> Assignee: Hai Nguyen
> Labels: backlogs
> Original Estimate: 4 hours
> Time Spent: 2 days, 3 hours, 20 minutes
> Remaining Estimate: 40 minutes
>
> - Login portal
> - Go to user and group management
> - Choose Group management tab
> - Add new group ( ex: AAA)
> - Go to Pages
> - Add new page for group above
> - Search this page and click edit
> - Click view page properties
> - Change access and edit permission to ( organization/*)
> - Click Finish button on Editor composer
> => Unknown error and throw exception in console
> {noformat}
> 2013-08-08 15:20:18,549 | ERROR | Error during the processAction phase [portal:UIPortalApplication<http-nio-0.0.0.0-8080-exec-10>]
> java.lang.NullPointerException: null
> at org.exoplatform.portal.webui.portal.UIPortalComposer$FinishPageEditionActionListener.execute(UIPortalComposer.java:680) ~[exo.portal.webui.portal-3.5.6-PLF.jar:3.5.6-PLF]
>
> {noformat}
>
> Reproduce on edit site is the same
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3245) Add comfriming when user remove permissions on edit page & site
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3245?page=com.atlassian.jira.pl... ]
Trong Tran updated GTNPORTAL-3245:
----------------------------------
Status: Open (was: Pull Request Sent)
There are conflicts with latest master
> Add comfriming when user remove permissions on edit page & site
> ---------------------------------------------------------------
>
> Key: GTNPORTAL-3245
> URL: https://issues.jboss.org/browse/GTNPORTAL-3245
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.1.Final
> Reporter: Hai Nguyen
> Assignee: Hai Nguyen
> Labels: backlogs
> Original Estimate: 4 hours
> Time Spent: 2 days, 3 hours
> Remaining Estimate: 1 hour
>
> - Login portal
> - Go to user and group management
> - Choose Group management tab
> - Add new group ( ex: AAA)
> - Go to Pages
> - Add new page for group above
> - Search this page and click edit
> - Click view page properties
> - Change access and edit permission to ( organization/*)
> - Click Finish button on Editor composer
> => Unknown error and throw exception in console
> {noformat}
> 2013-08-08 15:20:18,549 | ERROR | Error during the processAction phase [portal:UIPortalApplication<http-nio-0.0.0.0-8080-exec-10>]
> java.lang.NullPointerException: null
> at org.exoplatform.portal.webui.portal.UIPortalComposer$FinishPageEditionActionListener.execute(UIPortalComposer.java:680) ~[exo.portal.webui.portal-3.5.6-PLF.jar:3.5.6-PLF]
>
> {noformat}
>
> Reproduce on edit site is the same
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3245) Add comfriming when user remove permissions on edit page & site
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3245?page=com.atlassian.jira.pl... ]
Trong Tran updated GTNPORTAL-3245:
----------------------------------
Priority: Major (was: Minor)
> Add comfriming when user remove permissions on edit page & site
> ---------------------------------------------------------------
>
> Key: GTNPORTAL-3245
> URL: https://issues.jboss.org/browse/GTNPORTAL-3245
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.1.Final
> Reporter: Hai Nguyen
> Assignee: Hai Nguyen
> Labels: backlogs
> Original Estimate: 4 hours
> Time Spent: 2 days, 3 hours
> Remaining Estimate: 1 hour
>
> - Login portal
> - Go to user and group management
> - Choose Group management tab
> - Add new group ( ex: AAA)
> - Go to Pages
> - Add new page for group above
> - Search this page and click edit
> - Click view page properties
> - Change access and edit permission to ( organization/*)
> - Click Finish button on Editor composer
> => Unknown error and throw exception in console
> {noformat}
> 2013-08-08 15:20:18,549 | ERROR | Error during the processAction phase [portal:UIPortalApplication<http-nio-0.0.0.0-8080-exec-10>]
> java.lang.NullPointerException: null
> at org.exoplatform.portal.webui.portal.UIPortalComposer$FinishPageEditionActionListener.execute(UIPortalComposer.java:680) ~[exo.portal.webui.portal-3.5.6-PLF.jar:3.5.6-PLF]
>
> {noformat}
>
> Reproduce on edit site is the same
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-2899) The membership type "*" is not interpreted
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2899?page=com.atlassian.jira.pl... ]
Trong Tran resolved GTNPORTAL-2899.
-----------------------------------
Resolution: Done
> The membership type "*" is not interpreted
> -------------------------------------------
>
> Key: GTNPORTAL-2899
> URL: https://issues.jboss.org/browse/GTNPORTAL-2899
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.3.Final
> Environment: eXo Platform 4.0.0-Beta2
> Reporter: Hela Zekri
> Assignee: Trong Tran
> Priority: Blocker
> Labels: portal-s71, worked
> Fix For: 3.7.0.Final
>
> Original Estimate: 4 hours
> Time Spent: 4 hours
> Remaining Estimate: 0 minutes
>
> {color:red}
> In eXo Platform, we have the membership type "*". If user has this membership type in a group, it means that he has all membership types in this group.
> {color}
> *Please try this scenario :*
> Add a user that has the membership type "manager" in "/platform/administrators" group and the membership type "*" in "/platform/users" group.
> When this user clicks "add page" in "Page Management", he has the possibility to choose the owner type "group" or "portal". If he chooses "group", the expected output is that he gets as "Owner Id", a selectbox that contains all groups in which he has the membership type "manager".
> (!) The membership type "manager" is set in "portal-configuration.xml" as value-param to UserACL component :
> {code:xml}
> <value-param>
> <name>navigation.creator.membership.type</name>
> <description>specific membership type have full permission with group navigation</description>
> <value>manager</value>
> </value-param>
> {code}
> In this case, user should get as "Owner Id" a selectbox that contains "/platform/administrators" and "/platform/users" groups(The membership type "*" includes "manager" membership type).
> But the current behavior is that the selectbox of "Owner Id" contains only the group "/platform/administator". This is due to the fact that the relationship "*" is considered as a String and not interpreted.
> *There are two possible solutions to this problem :*
> 1- Set the possibility to put many values for "navigation.creator.membership.type" value-param. So that we could do for example :
> {code:xml}
> <value-param>
> <name>navigation.creator.membership.type</name>
> <description>specific membership type have full permission with group navigation</description>
> <value>*,manager</value>
> </value-param>
> {code}
> 2- In "_findRoles_" method in "_org.picketlink.idm.impl.api.session.managers.RoleManagerImpl_" class :
> In the code bellow, each relationship of a user is compared to roleType ("manager"). If it is equal, it will be added to the list that will be returned. So even "*" is compared to "manager", it is not equal, so it won't be added.
> {code}
> for (IdentityObjectRelationship relationship : relationships)
> {
> if (roleType != null)
> {
> if (roleType.getName().equals(relationship.getName()))
> {
> roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
> }
> }
> else
> {
> roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
> }
> }
> {code}
> We created [https://issues.jboss.org/browse/PLIDM-40] in which we propose a patch that adds a test on "*" value.
> In the patch, we changed :
> {code}
> if (roleType.getName().equals(relationship.getName()))
> {code}
> to :
> {code}
> if ((roleType.getName().equals(relationship.getName())) || relationship.getName().equals("*"))
> {code}
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-2899) The membership type "*" is not interpreted
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2899?focusedWorklogId=12430148&... ]
Trong Tran logged work on GTNPORTAL-2899:
-----------------------------------------
Author: Trong Tran
Created on: 05/Nov/13 11:57 PM
Start Date: 05/Nov/13 11:57 PM
Worklog Time Spent: 1 hour
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 1 hour)
Time Spent: 4 hours (was: 3 hours)
Worklog Id: (was: 12430148)
> The membership type "*" is not interpreted
> -------------------------------------------
>
> Key: GTNPORTAL-2899
> URL: https://issues.jboss.org/browse/GTNPORTAL-2899
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.3.Final
> Environment: eXo Platform 4.0.0-Beta2
> Reporter: Hela Zekri
> Assignee: Trong Tran
> Priority: Blocker
> Labels: portal-s71, worked
> Fix For: 3.7.0.Final
>
> Original Estimate: 4 hours
> Time Spent: 4 hours
> Remaining Estimate: 0 minutes
>
> {color:red}
> In eXo Platform, we have the membership type "*". If user has this membership type in a group, it means that he has all membership types in this group.
> {color}
> *Please try this scenario :*
> Add a user that has the membership type "manager" in "/platform/administrators" group and the membership type "*" in "/platform/users" group.
> When this user clicks "add page" in "Page Management", he has the possibility to choose the owner type "group" or "portal". If he chooses "group", the expected output is that he gets as "Owner Id", a selectbox that contains all groups in which he has the membership type "manager".
> (!) The membership type "manager" is set in "portal-configuration.xml" as value-param to UserACL component :
> {code:xml}
> <value-param>
> <name>navigation.creator.membership.type</name>
> <description>specific membership type have full permission with group navigation</description>
> <value>manager</value>
> </value-param>
> {code}
> In this case, user should get as "Owner Id" a selectbox that contains "/platform/administrators" and "/platform/users" groups(The membership type "*" includes "manager" membership type).
> But the current behavior is that the selectbox of "Owner Id" contains only the group "/platform/administator". This is due to the fact that the relationship "*" is considered as a String and not interpreted.
> *There are two possible solutions to this problem :*
> 1- Set the possibility to put many values for "navigation.creator.membership.type" value-param. So that we could do for example :
> {code:xml}
> <value-param>
> <name>navigation.creator.membership.type</name>
> <description>specific membership type have full permission with group navigation</description>
> <value>*,manager</value>
> </value-param>
> {code}
> 2- In "_findRoles_" method in "_org.picketlink.idm.impl.api.session.managers.RoleManagerImpl_" class :
> In the code bellow, each relationship of a user is compared to roleType ("manager"). If it is equal, it will be added to the list that will be returned. So even "*" is compared to "manager", it is not equal, so it won't be added.
> {code}
> for (IdentityObjectRelationship relationship : relationships)
> {
> if (roleType != null)
> {
> if (roleType.getName().equals(relationship.getName()))
> {
> roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
> }
> }
> else
> {
> roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
> }
> }
> {code}
> We created [https://issues.jboss.org/browse/PLIDM-40] in which we propose a patch that adds a test on "*" value.
> In the patch, we changed :
> {code}
> if (roleType.getName().equals(relationship.getName()))
> {code}
> to :
> {code}
> if ((roleType.getName().equals(relationship.getName())) || relationship.getName().equals("*"))
> {code}
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-2899) The membership type "*" is not interpreted
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2899?page=com.atlassian.jira.pl... ]
Work on GTNPORTAL-2899 started by Trong Tran.
> The membership type "*" is not interpreted
> -------------------------------------------
>
> Key: GTNPORTAL-2899
> URL: https://issues.jboss.org/browse/GTNPORTAL-2899
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.3.Final
> Environment: eXo Platform 4.0.0-Beta2
> Reporter: Hela Zekri
> Assignee: Trong Tran
> Priority: Blocker
> Labels: portal-s71, worked
> Fix For: 3.7.0.Final
>
> Original Estimate: 4 hours
> Time Spent: 3 hours
> Remaining Estimate: 1 hour
>
> {color:red}
> In eXo Platform, we have the membership type "*". If user has this membership type in a group, it means that he has all membership types in this group.
> {color}
> *Please try this scenario :*
> Add a user that has the membership type "manager" in "/platform/administrators" group and the membership type "*" in "/platform/users" group.
> When this user clicks "add page" in "Page Management", he has the possibility to choose the owner type "group" or "portal". If he chooses "group", the expected output is that he gets as "Owner Id", a selectbox that contains all groups in which he has the membership type "manager".
> (!) The membership type "manager" is set in "portal-configuration.xml" as value-param to UserACL component :
> {code:xml}
> <value-param>
> <name>navigation.creator.membership.type</name>
> <description>specific membership type have full permission with group navigation</description>
> <value>manager</value>
> </value-param>
> {code}
> In this case, user should get as "Owner Id" a selectbox that contains "/platform/administrators" and "/platform/users" groups(The membership type "*" includes "manager" membership type).
> But the current behavior is that the selectbox of "Owner Id" contains only the group "/platform/administator". This is due to the fact that the relationship "*" is considered as a String and not interpreted.
> *There are two possible solutions to this problem :*
> 1- Set the possibility to put many values for "navigation.creator.membership.type" value-param. So that we could do for example :
> {code:xml}
> <value-param>
> <name>navigation.creator.membership.type</name>
> <description>specific membership type have full permission with group navigation</description>
> <value>*,manager</value>
> </value-param>
> {code}
> 2- In "_findRoles_" method in "_org.picketlink.idm.impl.api.session.managers.RoleManagerImpl_" class :
> In the code bellow, each relationship of a user is compared to roleType ("manager"). If it is equal, it will be added to the list that will be returned. So even "*" is compared to "manager", it is not equal, so it won't be added.
> {code}
> for (IdentityObjectRelationship relationship : relationships)
> {
> if (roleType != null)
> {
> if (roleType.getName().equals(relationship.getName()))
> {
> roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
> }
> }
> else
> {
> roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
> }
> }
> {code}
> We created [https://issues.jboss.org/browse/PLIDM-40] in which we propose a patch that adds a test on "*" value.
> In the patch, we changed :
> {code}
> if (roleType.getName().equals(relationship.getName()))
> {code}
> to :
> {code}
> if ((roleType.getName().equals(relationship.getName())) || relationship.getName().equals("*"))
> {code}
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-511) userPref of gadgets are not sometime not saved correctly
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-511?page=com.atlassian.jira.plu... ]
Trong Tran reassigned GTNPORTAL-511:
------------------------------------
Assignee: Tuyen Nguyen The (was: Vu Viet Phuong)
> userPref of gadgets are not sometime not saved correctly
> --------------------------------------------------------
>
> Key: GTNPORTAL-511
> URL: https://issues.jboss.org/browse/GTNPORTAL-511
> Project: GateIn Portal
> Issue Type: Bug
> Components: User Interface
> Affects Versions: 3.0.0-Beta04
> Environment: svn r1330
> Reporter: jerem j
> Assignee: Tuyen Nguyen The
> Fix For: 3.5.7.Final
>
> Attachments: GTNPORTAL-511.js.patch, GTNPORTAL-511.patch, stacktrace.txt
>
> Original Estimate: 2 days
> Remaining Estimate: 2 days
>
> Every call to gadgets.Prefs.set generate a call to save the data in the backend (an action in the dashboard portlet). To save we send all the set of preferences.
> The jira gadget call this API multiple times in a very short time. So there is multiple ajax request sent to the backend but not in a precise order. So it might happen that the first request arrive the last one, and so old preferences are saved.
> To fix:
> In the file Gadgets.js, function "gadgets.IfrGadgetService.prototype.setUserPref", prefs is updated with all the name/value, and ALL the prefs object is saved. Instead of saving all the preferences, we should only save the updated preferences.
> In org.exoplatform.portal.pom.spi.gadget.Gadget it will be needed to be able to add preference by name, something like :
> public void setUserPref(String name, String value)
> code :
> Gadgets.js: http://fisheye.exoplatform.org/browse/projects/portal/trunk/web/eXoResour...
> ExoBasedUserPrefStore.js: http://fisheye.exoplatform.org/browse/projects/portal/trunk/web/eXoResour...
> links:
> API doc about adgets.Prefs.set: http://code.google.com/apis/gadgets/docs/reference/#gadgets.Prefs.set
> Jira gadget to test: http://jira4j.exoplatform.org/rest/gadgets/1.0/g/com.atlassian.jira.gadge...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-511) userPref of gadgets are not sometime not saved correctly
by Trong Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-511?page=com.atlassian.jira.plu... ]
Trong Tran reassigned GTNPORTAL-511:
------------------------------------
Assignee: Vu Viet Phuong (was: Julien Viet)
> userPref of gadgets are not sometime not saved correctly
> --------------------------------------------------------
>
> Key: GTNPORTAL-511
> URL: https://issues.jboss.org/browse/GTNPORTAL-511
> Project: GateIn Portal
> Issue Type: Bug
> Components: User Interface
> Affects Versions: 3.0.0-Beta04
> Environment: svn r1330
> Reporter: jerem j
> Assignee: Vu Viet Phuong
> Fix For: 3.5.7.Final
>
> Attachments: GTNPORTAL-511.js.patch, GTNPORTAL-511.patch, stacktrace.txt
>
> Original Estimate: 2 days
> Remaining Estimate: 2 days
>
> Every call to gadgets.Prefs.set generate a call to save the data in the backend (an action in the dashboard portlet). To save we send all the set of preferences.
> The jira gadget call this API multiple times in a very short time. So there is multiple ajax request sent to the backend but not in a precise order. So it might happen that the first request arrive the last one, and so old preferences are saved.
> To fix:
> In the file Gadgets.js, function "gadgets.IfrGadgetService.prototype.setUserPref", prefs is updated with all the name/value, and ALL the prefs object is saved. Instead of saving all the preferences, we should only save the updated preferences.
> In org.exoplatform.portal.pom.spi.gadget.Gadget it will be needed to be able to add preference by name, something like :
> public void setUserPref(String name, String value)
> code :
> Gadgets.js: http://fisheye.exoplatform.org/browse/projects/portal/trunk/web/eXoResour...
> ExoBasedUserPrefStore.js: http://fisheye.exoplatform.org/browse/projects/portal/trunk/web/eXoResour...
> links:
> API doc about adgets.Prefs.set: http://code.google.com/apis/gadgets/docs/reference/#gadgets.Prefs.set
> Jira gadget to test: http://jira4j.exoplatform.org/rest/gadgets/1.0/g/com.atlassian.jira.gadge...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3284) Errors in saving long access-token for some social networks
by Marek Posolda (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3284?page=com.atlassian.jira.pl... ]
Marek Posolda updated GTNPORTAL-3284:
-------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/gatein/gatein-portal/pull/683
> Errors in saving long access-token for some social networks
> -----------------------------------------------------------
>
> Key: GTNPORTAL-3284
> URL: https://issues.jboss.org/browse/GTNPORTAL-3284
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.3.Final
> Reporter: Marek Posolda
> Assignee: Marek Posolda
> Fix For: 3.7.0.Final
>
>
> In some cases, it could happen that during binding of user to some social network (Facebook/Google/Twitter), the binding is not successful because of the fact that access token or refresh token is too long and DB throws error because of size limit of particular column (H2 has default limit of 255 characters per column)
> The exception stacktrace could look like this:
> {code}
> 12:06:50,595 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/127.0.0.1:8080-3) SQL Error: 22001, SQLState: 22001
> 12:06:50,595 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/127.0.0.1:8080-3) Value too long for column "ATTR_VALUE VARCHAR(255)": "STRINGDECODE('VvjdI6prHvZXN6CG95jWIpkPLS0i6WMtitYVNeE8TRIfI3y+sCOxxJRqKIP9iCojWCajhup0QTro\nUe0YrgTbhKQbH7fMLEYOWKgtTNDt2omE5A0g... (259)"; SQL statement:
> insert into jbid_io_attr_text_values (TEXT_ATTR_VALUE_ID, ATTR_VALUE) values (?, ?) [22001-168]
> 12:06:50,597 INFO [org.exoplatform.services.organization.idm.UserProfileDAOImpl] (http-/127.0.0.1:8080-3) Identity operation error: : org.hibernate.exception.DataException: could not execute statement
> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:134)
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136)
> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
> at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1474)
> at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:86)
> at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:278)
> at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328)
> at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:62)
> at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1205)
> at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1655)
> at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
> at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getAttributes(HibernateIdentityStoreImpl.java:2108) [picketlink-idm-hibernate-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.getAttributes(WrapperIdentityStoreRepository.java:392) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.getAttributes(AttributesManagerImpl.java:194) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updateAttributes(AttributesManagerImpl.java:255) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updateAttributes(AttributesManagerImpl.java:280) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.exoplatform.services.organization.idm.UserProfileDAOImpl.setProfile(UserProfileDAOImpl.java:259) [exo.portal.component.identity-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.exoplatform.services.organization.idm.UserProfileDAOImpl.saveUserProfile(UserProfileDAOImpl.java:97) [exo.portal.component.identity-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.gatein.security.oauth.data.SocialNetworkServiceImpl.updateOAuthInfo(SocialNetworkServiceImpl.java:136) [exo.portal.component.web.oauth-common-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.gatein.security.oauth.web.OAuthLinkAccountFilter.doFilter(OAuthLinkAccountFilter.java:91) [exo.portal.component.web.oauth-web-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.gatein.sso.integration.SSODelegateFilter$SSOFilterChain.doFilter(SSODelegateFilter.java:119) [sso-integration-1.3.4.Final-redhat-2.jar:1.3.4.Final-redhat-2]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3284) Errors in saving long access-token for some social networks
by Marek Posolda (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3284?page=com.atlassian.jira.pl... ]
Marek Posolda commented on GTNPORTAL-3284:
------------------------------------------
I have a fix in this commit https://github.com/mposolda/gatein-portal/commit/6cc77533f9d4f721adcc7421... . For some reason, I can't send PR right now due to some strange github behaviour. Will try it later...
I didn't reproduce the issue with GateIn/JPP, but I can imagine how it could happen. Maybe it happens just for access tokens of some people for particular social network (For some reason access tokens of some users could be longer than my access tokens etc).
However I've reproduced the issue with unit test with H2 profile (mvn test -Ph2), so I think that I have a fix as unit test is passing now. The fix is actually trying to split long access tokens into more "children" attributes (chunks) and add all those chunked attributes into UserProfile. Solution should be backward-compatible with already existing DB and JPP 6.1.
> Errors in saving long access-token for some social networks
> -----------------------------------------------------------
>
> Key: GTNPORTAL-3284
> URL: https://issues.jboss.org/browse/GTNPORTAL-3284
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.3.Final
> Reporter: Marek Posolda
> Assignee: Marek Posolda
> Fix For: 3.7.0.Final
>
>
> In some cases, it could happen that during binding of user to some social network (Facebook/Google/Twitter), the binding is not successful because of the fact that access token or refresh token is too long and DB throws error because of size limit of particular column (H2 has default limit of 255 characters per column)
> The exception stacktrace could look like this:
> {code}
> 12:06:50,595 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/127.0.0.1:8080-3) SQL Error: 22001, SQLState: 22001
> 12:06:50,595 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/127.0.0.1:8080-3) Value too long for column "ATTR_VALUE VARCHAR(255)": "STRINGDECODE('VvjdI6prHvZXN6CG95jWIpkPLS0i6WMtitYVNeE8TRIfI3y+sCOxxJRqKIP9iCojWCajhup0QTro\nUe0YrgTbhKQbH7fMLEYOWKgtTNDt2omE5A0g... (259)"; SQL statement:
> insert into jbid_io_attr_text_values (TEXT_ATTR_VALUE_ID, ATTR_VALUE) values (?, ?) [22001-168]
> 12:06:50,597 INFO [org.exoplatform.services.organization.idm.UserProfileDAOImpl] (http-/127.0.0.1:8080-3) Identity operation error: : org.hibernate.exception.DataException: could not execute statement
> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:134)
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136)
> at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
> at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1474)
> at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:86)
> at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
> at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:278)
> at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328)
> at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:62)
> at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1205)
> at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1655)
> at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
> at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getAttributes(HibernateIdentityStoreImpl.java:2108) [picketlink-idm-hibernate-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.getAttributes(WrapperIdentityStoreRepository.java:392) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.getAttributes(AttributesManagerImpl.java:194) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updateAttributes(AttributesManagerImpl.java:255) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updateAttributes(AttributesManagerImpl.java:280) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
> at org.exoplatform.services.organization.idm.UserProfileDAOImpl.setProfile(UserProfileDAOImpl.java:259) [exo.portal.component.identity-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.exoplatform.services.organization.idm.UserProfileDAOImpl.saveUserProfile(UserProfileDAOImpl.java:97) [exo.portal.component.identity-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.gatein.security.oauth.data.SocialNetworkServiceImpl.updateOAuthInfo(SocialNetworkServiceImpl.java:136) [exo.portal.component.web.oauth-common-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.gatein.security.oauth.web.OAuthLinkAccountFilter.doFilter(OAuthLinkAccountFilter.java:91) [exo.portal.component.web.oauth-web-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
> at org.gatein.sso.integration.SSODelegateFilter$SSOFilterChain.doFilter(SSODelegateFilter.java:119) [sso-integration-1.3.4.Final-redhat-2.jar:1.3.4.Final-redhat-2]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years