[JBoss JIRA] (GTNPORTAL-2899) The membership type "*" is not interpreted
by Hela Zekri (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2899?page=com.atlassian.jira.pl... ]
Hela Zekri commented on GTNPORTAL-2899:
---------------------------------------
@Vu Viet Phuong : I confirm this is a feature request, but it is critical for eXo Platform product.
> 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: Vu Viet Phuong
> Priority: Blocker
> Labels: portal-s70
>
> {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, 11 months
[JBoss JIRA] (GTNPORTAL-2899) The membership type "*" is not interpreted
by Hela Zekri (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2899?page=com.atlassian.jira.pl... ]
Hela Zekri updated GTNPORTAL-2899:
----------------------------------
Issue Type: Feature Request (was: Bug)
> 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: Vu Viet Phuong
> Priority: Blocker
> Labels: portal-s70
>
> {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, 11 months
[JBoss JIRA] (GTNPORTAL-2711) Database/jcr is not initialized before first call
by Minh Hoang TO (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2711?page=com.atlassian.jira.pl... ]
Minh Hoang TO updated GTNPORTAL-2711:
-------------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/gatein/gatein-portal/pull/396
> Database/jcr is not initialized before first call
> -------------------------------------------------
>
> Key: GTNPORTAL-2711
> URL: https://issues.jboss.org/browse/GTNPORTAL-2711
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Stian Thorgersen
> Assignee: Minh Hoang TO
> Labels: portal-s70
> Fix For: 3.6.0.Beta02
>
>
> I believe some data structures are not initialized in chromattic/jcr until first used. If multiple threads do this at the same time it causes an ItemExistsException to be thrown.
> To reproduce this issue I've slightly modified TestGadgetTokenInfoService in gadgets/core available here https://github.com/stianst/gatein-portal/tree/GTNPORTAL-2711. It may not fail the first time, so run it a few times if it doesn't.
> Stack trace:
> {code}
> org.chromattic.api.UndeclaredRepositoryException: javax.jcr.ItemExistsException: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41b
> aa4a6e, ParentID: 00exo0jcr0root0uuid0000000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or
> index violation: JCR_IDX_IPORTALTEST_PARENT: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uu
> id0000000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTE
> ST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.chromattic.core.DomainSession.save(DomainSession.java:181)
> at org.chromattic.core.api.ChromatticSessionImpl.save(ChromatticSessionImpl.java:246)
> at org.exoplatform.commons.chromattic.AbstractContext.close(AbstractContext.java:129)
> at org.exoplatform.commons.chromattic.LocalContext.close(LocalContext.java:56)
> at org.exoplatform.commons.chromattic.ChromatticLifeCycle.closeContext(ChromatticLifeCycle.java:306)
> at org.exoplatform.commons.chromattic.ContextualTask.executeWith(ContextualTask.java:49)
> at org.exoplatform.portal.gadget.core.GadgetTokenInfoService.createToken(GadgetTokenInfoService.java:50)
> at org.exoplatform.portal.gadget.TestGadgetTokenInfoService.createTokens(TestGadgetTokenInfoService.java:69)
> at org.exoplatform.portal.gadget.TestGadgetTokenInfoService.testGetToken(TestGadgetTokenInfoService.java:88)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at org.exoplatform.component.test.AbstractGateInTest.runBare(AbstractGateInTest.java:91)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:243)
> at junit.framework.TestSuite.run(TestSuite.java:238)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
> at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
> Caused by: javax.jcr.ItemExistsException: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uuid00
> 00000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_P
> ARENT: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uuid0000000000000. Cause >>>> integrity c
> onstraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violati
> on: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.exoplatform.services.jcr.impl.core.SessionDataManager.commit(SessionDataManager.java:1565)
> at org.exoplatform.services.jcr.impl.core.ItemImpl.save(ItemImpl.java:706)
> at org.exoplatform.services.jcr.impl.core.SessionImpl.save(SessionImpl.java:1080)
> at org.exoplatform.commons.chromattic.PortalSessionLifeCycle.save(PortalSessionLifeCycle.java:56)
> at org.chromattic.core.jcr.SessionWrapperImpl.save(SessionWrapperImpl.java:274)
> at org.chromattic.core.DomainSessionImpl._save(DomainSessionImpl.java:640)
> at org.chromattic.core.DomainSession.save(DomainSession.java:178)
> ... 34 more
> Caused by: javax.jcr.ItemExistsException: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uuid00
> 00000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_P
> ARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.exoplatform.services.jcr.impl.storage.jdbc.SQLExceptionHandler.handleAddException(SQLExceptionHandler.java:141)
> at org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection.add(JDBCStorageConnection.java:746)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.doAdd(WorkspacePersistentDataManager.java:1009)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager$ChangesLogPersister.save(WorkspacePersistentDataManager.java:662)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.save(WorkspacePersistentDataManager.java:333)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.doSave(CacheableWorkspaceDataManager.java:1102)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.access$800(CacheableWorkspaceDataManager.java:93)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager$9.run(CacheableWorkspaceDataManager.java:1045)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager$9.run(CacheableWorkspaceDataManager.java:1042)
> at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedExceptionAction(SecurityHelper.java:310)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.save(CacheableWorkspaceDataManager.java:1041)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.save(CacheableWorkspaceDataManager.java:1007)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.ShareableSupportedWorkspaceDataManager.save(ShareableSupportedWorkspaceDataManager.java:176)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.VersionableWorkspaceDataManager.save(VersionableWorkspaceDataManager.java:334)
> at org.exoplatform.services.jcr.impl.dataflow.session.TransactionableDataManager.save(TransactionableDataManager.java:471)
> at org.exoplatform.services.jcr.impl.core.SessionDataManager.commit(SessionDataManager.java:1549)
> ... 40 more
> Caused by: java.sql.SQLException: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
> at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)
> at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
> at org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.db.MultiDbJDBCConnection.addNodeRecord(MultiDbJDBCConnection.java:253)
> at org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection.add(JDBCStorageConnection.java:732)
> ... 54 more
> Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.hsqldb.error.Error.error(Unknown Source)
> at org.hsqldb.index.IndexAVLMemory.insert(Unknown Source)
> at org.hsqldb.persist.RowStoreAVL.indexRow(Unknown Source)
> at org.hsqldb.Table.insertSingleRow(Unknown Source)
> at org.hsqldb.StatementDML.insertSingleRow(Unknown Source)
> at org.hsqldb.StatementInsert.getResult(Unknown Source)
> at org.hsqldb.StatementDMQL.execute(Unknown Source)
> at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
> at org.hsqldb.Session.execute(Unknown Source)
> ... 59 more
> {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, 11 months
[JBoss JIRA] (GTNPORTAL-2897) Problem when changing owner type to "group" while adding a page in Page Management
by Hela Zekri (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2897?page=com.atlassian.jira.pl... ]
Hela Zekri updated GTNPORTAL-2897:
----------------------------------
Priority: Blocker (was: Critical)
> Problem when changing owner type to "group" while adding a page in Page Management
> ----------------------------------------------------------------------------------
>
> Key: GTNPORTAL-2897
> URL: https://issues.jboss.org/browse/GTNPORTAL-2897
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.3.Final
> Reporter: Hela Zekri
> Assignee: Hai Nguyen
> Priority: Blocker
> Labels: portal-s70
>
> *Please follow these steps :*
> * login as root
> * Go to Group --> Organization --> Users and Groups Manager
> * In User Management tab, edit user John, go to User Membership and delete all membership type "manager" in all groups.
> * Sign out and login as john
> * Import applications from "Application Registry Portlet" (Add a page to access this portlet). Then, add a page containing Page Management Portlet.
> * Go to this page and click "add page". Choose "group" as owner type. *The owner id will remain "classic" and an exception is thrown.*
> {noformat}
> GRAVE: Error while handling request
> java.lang.NullPointerException
> at org.exoplatform.portal.webui.page.UIPageForm$ChangeOwnerTypeActionListener.execute(UIPageForm.java:321)
> at org.exoplatform.webui.event.Event.broadcast(Event.java:89)
> at org.exoplatform.webui.core.lifecycle.UIFormLifecycle.processDecode(UIFormLifecycle.java:59)
> at org.exoplatform.webui.core.lifecycle.UIFormLifecycle.processDecode(UIFormLifecycle.java:40)
> at org.exoplatform.webui.core.UIComponent.processDecode(UIComponent.java:124)
> at org.exoplatform.webui.form.UIFormTabPane.processDecode(UIFormTabPane.java:80)
> at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processDecode(UIPortalApplicationLifecycle.java:59)
> at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processDecode(UIPortalApplicationLifecycle.java:37)
> at org.exoplatform.webui.core.UIComponent.processDecode(UIComponent.java:124)
> at org.exoplatform.portal.webui.workspace.UIPortalApplication.processDecode(UIPortalApplication.java:537)
> at org.exoplatform.portal.application.PortalRequestHandler.processRequest(PortalRequestHandler.java:182)
> at org.exoplatform.portal.application.PortalRequestHandler.execute(PortalRequestHandler.java:161)
> at org.exoplatform.web.WebAppController.service(WebAppController.java:358)
> at org.exoplatform.portal.application.PortalController.onService(PortalController.java:125)
> at org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:132)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.web.login.RememberMeFilter.doFilter(RememberMeFilter.java:84)
> at org.exoplatform.web.login.RememberMeFilter.doFilter(RememberMeFilter.java:54)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:114)
> at org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:84)
> at org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:78)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:73)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter.doFilter(ThreadLocalSessionProviderInitializedFilter.java:116)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:88)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.portal.application.localization.LocalizationFilter.doFilter(LocalizationFilter.java:178)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.exoplatform.container.web.PortalContainerFilter.doFilter(PortalContainerFilter.java:69)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:421)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:662)
> {noformat}
> In fact, when user changes the owner type to "group", the expected behavior is that *all groups in which he has the role "manager" are returned in the next select Box.*
> But in this case, user doesn't have any group in which he has "manager" as membership type. This behavior is not expected in the code, so the owner id keeps the value of "intranet" and a "NullPointerException" is thrown.
> This is due to this instruction in "ChangeOwnerTypeActionListener" of "UIPageForm" class :
> {code}
> String groupIdSelected = uiForm.groupIdSelectBox.getValue();
> {code}
> Indeed, when there isn't any group in which user has the memebership Type "manager", the value of "uiForm.groupIdSelectBox" is null, that's why the problem appears.
> *If user hasn't the role "manager" in any group, there are two possible solutions to fix the problem :*
> 1- Only the owner type "portal" appears.
> 2- In owner type, both "portal" and "group" appear. But if user chooses "group", a message appears to inform him that he hasn't the permissions to add a page in any group.
> (!) The memebership "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}
--
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, 11 months
[JBoss JIRA] (GTNPORTAL-2711) Database/jcr is not initialized before first call
by Minh Hoang TO (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2711?page=com.atlassian.jira.pl... ]
Minh Hoang TO commented on GTNPORTAL-2711:
------------------------------------------
Method getGadgetTokenContainer() in GadgetTokenInfoService$TokenTask does not handle concurrent initialization of GadgetTokenContainer, and that leads to exception in current issue
{code:java}
protected final GadgetTokenContainer getGadgetTokenContainer() {
ChromatticSession session = context.getSession();
GadgetTokenContainer container = session.findByPath(GadgetTokenContainer.class, "gadgettokens");
if (container == null) {
container = session.insert(GadgetTokenContainer.class, "gadgettokens");
}
return container;
}
{code}
> Database/jcr is not initialized before first call
> -------------------------------------------------
>
> Key: GTNPORTAL-2711
> URL: https://issues.jboss.org/browse/GTNPORTAL-2711
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Stian Thorgersen
> Assignee: Minh Hoang TO
> Labels: portal-s70
> Fix For: 3.6.0.Beta02
>
>
> I believe some data structures are not initialized in chromattic/jcr until first used. If multiple threads do this at the same time it causes an ItemExistsException to be thrown.
> To reproduce this issue I've slightly modified TestGadgetTokenInfoService in gadgets/core available here https://github.com/stianst/gatein-portal/tree/GTNPORTAL-2711. It may not fail the first time, so run it a few times if it doesn't.
> Stack trace:
> {code}
> org.chromattic.api.UndeclaredRepositoryException: javax.jcr.ItemExistsException: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41b
> aa4a6e, ParentID: 00exo0jcr0root0uuid0000000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or
> index violation: JCR_IDX_IPORTALTEST_PARENT: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uu
> id0000000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTE
> ST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.chromattic.core.DomainSession.save(DomainSession.java:181)
> at org.chromattic.core.api.ChromatticSessionImpl.save(ChromatticSessionImpl.java:246)
> at org.exoplatform.commons.chromattic.AbstractContext.close(AbstractContext.java:129)
> at org.exoplatform.commons.chromattic.LocalContext.close(LocalContext.java:56)
> at org.exoplatform.commons.chromattic.ChromatticLifeCycle.closeContext(ChromatticLifeCycle.java:306)
> at org.exoplatform.commons.chromattic.ContextualTask.executeWith(ContextualTask.java:49)
> at org.exoplatform.portal.gadget.core.GadgetTokenInfoService.createToken(GadgetTokenInfoService.java:50)
> at org.exoplatform.portal.gadget.TestGadgetTokenInfoService.createTokens(TestGadgetTokenInfoService.java:69)
> at org.exoplatform.portal.gadget.TestGadgetTokenInfoService.testGetToken(TestGadgetTokenInfoService.java:88)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at org.exoplatform.component.test.AbstractGateInTest.runBare(AbstractGateInTest.java:91)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:243)
> at junit.framework.TestSuite.run(TestSuite.java:238)
> at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
> at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
> Caused by: javax.jcr.ItemExistsException: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uuid00
> 00000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_P
> ARENT: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uuid0000000000000. Cause >>>> integrity c
> onstraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violati
> on: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.exoplatform.services.jcr.impl.core.SessionDataManager.commit(SessionDataManager.java:1565)
> at org.exoplatform.services.jcr.impl.core.ItemImpl.save(ItemImpl.java:706)
> at org.exoplatform.services.jcr.impl.core.SessionImpl.save(SessionImpl.java:1080)
> at org.exoplatform.commons.chromattic.PortalSessionLifeCycle.save(PortalSessionLifeCycle.java:56)
> at org.chromattic.core.jcr.SessionWrapperImpl.save(SessionWrapperImpl.java:274)
> at org.chromattic.core.DomainSessionImpl._save(DomainSessionImpl.java:640)
> at org.chromattic.core.DomainSession.save(DomainSession.java:178)
> ... 34 more
> Caused by: javax.jcr.ItemExistsException: [portal-test] ADD NODE. Item already exists. Condition: parent ID, name, index. []:1[]gadgettokens:1, ID: db7e626b7f0001013865a7c41baa4a6e, ParentID: 00exo0jcr0root0uuid00
> 00000000000. Cause >>>> integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_P
> ARENT: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.exoplatform.services.jcr.impl.storage.jdbc.SQLExceptionHandler.handleAddException(SQLExceptionHandler.java:141)
> at org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection.add(JDBCStorageConnection.java:746)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.doAdd(WorkspacePersistentDataManager.java:1009)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager$ChangesLogPersister.save(WorkspacePersistentDataManager.java:662)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.save(WorkspacePersistentDataManager.java:333)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.doSave(CacheableWorkspaceDataManager.java:1102)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.access$800(CacheableWorkspaceDataManager.java:93)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager$9.run(CacheableWorkspaceDataManager.java:1045)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager$9.run(CacheableWorkspaceDataManager.java:1042)
> at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedExceptionAction(SecurityHelper.java:310)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.save(CacheableWorkspaceDataManager.java:1041)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.save(CacheableWorkspaceDataManager.java:1007)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.ShareableSupportedWorkspaceDataManager.save(ShareableSupportedWorkspaceDataManager.java:176)
> at org.exoplatform.services.jcr.impl.dataflow.persistent.VersionableWorkspaceDataManager.save(VersionableWorkspaceDataManager.java:334)
> at org.exoplatform.services.jcr.impl.dataflow.session.TransactionableDataManager.save(TransactionableDataManager.java:471)
> at org.exoplatform.services.jcr.impl.core.SessionDataManager.commit(SessionDataManager.java:1549)
> ... 40 more
> Caused by: java.sql.SQLException: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
> at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)
> at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
> at org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.db.MultiDbJDBCConnection.addNodeRecord(MultiDbJDBCConnection.java:253)
> at org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection.add(JDBCStorageConnection.java:732)
> ... 54 more
> Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation: JCR_IDX_IPORTALTEST_PARENT
> at org.hsqldb.error.Error.error(Unknown Source)
> at org.hsqldb.index.IndexAVLMemory.insert(Unknown Source)
> at org.hsqldb.persist.RowStoreAVL.indexRow(Unknown Source)
> at org.hsqldb.Table.insertSingleRow(Unknown Source)
> at org.hsqldb.StatementDML.insertSingleRow(Unknown Source)
> at org.hsqldb.StatementInsert.getResult(Unknown Source)
> at org.hsqldb.StatementDMQL.execute(Unknown Source)
> at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
> at org.hsqldb.Session.execute(Unknown Source)
> ... 59 more
> {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, 11 months