Uploaded image for project: 'GateIn Portal'
  1. GateIn Portal
  2. GTNPORTAL-3262

Error on importing new group from LDAP whose name contains ampersand character

    Details

      Description

      As far as I know, by default, group name containing ampersand (&) character is forbidden in GateIn. As the result, we cannot create a group with ampersand in UI.
      However, ampersand is legal character in LDAP. As the result, when we synchronize this type of group, there are several exception.
      Case to reproduce in PLF with OpenDS

      • In OpenDS server, create dc=nodomain context and import [^Ampersand.ldif]
      • Config GateIn to use LDAP
      • Start server
        -> Exception in console
        2013-09-03 16:36:02,972 | ERROR | Error parsing document (line 27, col 23) file: /group/template/group/group.xml [o.e.p.config.NewPortalConfigListener<Catalina-startStop-1>] 
        org.jibx.runtime.JiBXException: Error parsing document (line 27, col 23)
        	at org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.nextToken(XMLPullReaderFactory.java:281) ~[jibx-run-1.2.5.jar:na]
        	at org.jibx.runtime.impl.UnmarshallingContext.accumulateText(UnmarshallingContext.java:840) ~[jibx-run-1.2.5.jar:na]
        	at org.jibx.runtime.impl.UnmarshallingContext.parseContentText(UnmarshallingContext.java:874) ~[jibx-run-1.2.5.jar:na]
        	at org.jibx.runtime.impl.UnmarshallingContext.parseElementText(UnmarshallingContext.java:936) ~[jibx-run-1.2.5.jar:na]
        	at org.exoplatform.portal.config.model.PortalConfig.JiBX_binding_unmarshal_2_0(PortalConfig.java) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.model.JiBX_bindingPortalConfig_access.unmarshal() ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757) ~[jibx-run-1.2.5.jar:na]
        	at org.exoplatform.portal.config.model.ModelUnmarshaller.unmarshall(ModelUnmarshaller.java:50) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.NewPortalConfigListener.fromXML(NewPortalConfigListener.java:655) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.NewPortalConfigListener.getConfig(NewPortalConfigListener.java:565) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.NewPortalConfigListener.createPortalConfig(NewPortalConfigListener.java:453) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.UserPortalConfigService.createUserPortalConfig(UserPortalConfigService.java:346) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.UserPortalConfigService.createGroupSite(UserPortalConfigService.java:320) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.GroupPortalConfigListener.preSave(GroupPortalConfigListener.java:113) [exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.invokeListenersToSavedGroup(OrganizationIntegrationService.java:1149) [platform-component-organization-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.syncGroup(OrganizationIntegrationService.java:405) [platform-component-organization-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.syncAllGroups(OrganizationIntegrationService.java:339) [platform-component-organization-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.start(OrganizationIntegrationService.java:164) [platform-component-organization-4.0.2.jar:4.0.2]
        	at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) ~[na:na]
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_27]
        	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_27]
        	at org.exoplatform.container.LifecycleVisitor.traverse(LifecycleVisitor.java:100) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.LifecycleVisitor.start(LifecycleVisitor.java:170) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:554) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.ExoContainer.start(ExoContainer.java:275) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.PortalContainer.start(PortalContainer.java:683) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.ExoContainer.start(ExoContainer.java:263) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.RootContainer.createPortalContainer(RootContainer.java:681) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.RootContainer.createPortalContainers(RootContainer.java:346) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator$1.run(PortalContainersCreator.java:52) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator$1.run(PortalContainersCreator.java:50) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedAction(SecurityHelper.java:290) [exo.kernel.commons-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator.createPortalContainers(PortalContainersCreator.java:50) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator.lifecycleEvent(PortalContainersCreator.java:39) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.42]
        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_27]
        	at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_27]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_27]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_27]
        	at java.lang.Thread.run(Thread.java:662) [na:1.6.0_27]
        Caused by: org.xmlpull.v1.XmlPullParserException: entity reference name can not contain character <' (position: TEXT seen ...<portal-name>/R&D<... @27:23) 
        	at org.xmlpull.mxp1.MXParser.parseEntityRef(MXParser.java:2222) ~[xpp3-1.1.4c.jar:na]
        	at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1275) ~[xpp3-1.1.4c.jar:na]
        	at org.xmlpull.mxp1.MXParser.nextToken(MXParser.java:1100) ~[xpp3-1.1.4c.jar:na]
        	at org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.nextToken(XMLPullReaderFactory.java:277) ~[jibx-run-1.2.5.jar:na]
        	... 47 common frames omitted
        2013-09-03 16:36:02,973 | ERROR | Could not load file: /group/template/group/group.xml [o.e.p.config.NewPortalConfigListener<Catalina-startStop-1>] 
        2013-09-03 16:36:02,976 | WARN  | 			Failed to call preSave on /R&D Group, listener = class org.exoplatform.portal.config.GroupPortalConfigListener [o.e.p.o.i.OrganizationIntegrationService<Catalina-startStop-1>] 
        org.jibx.runtime.JiBXException: Error parsing document (line 27, col 23)
        	at org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.nextToken(XMLPullReaderFactory.java:281) ~[jibx-run-1.2.5.jar:na]
        	at org.jibx.runtime.impl.UnmarshallingContext.accumulateText(UnmarshallingContext.java:840) ~[jibx-run-1.2.5.jar:na]
        	at org.jibx.runtime.impl.UnmarshallingContext.parseContentText(UnmarshallingContext.java:874) ~[jibx-run-1.2.5.jar:na]
        	at org.jibx.runtime.impl.UnmarshallingContext.parseElementText(UnmarshallingContext.java:936) ~[jibx-run-1.2.5.jar:na]
        	at org.exoplatform.portal.config.model.PortalConfig.JiBX_binding_unmarshal_2_0(PortalConfig.java) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.model.JiBX_bindingPortalConfig_access.unmarshal() ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757) ~[jibx-run-1.2.5.jar:na]
        	at org.exoplatform.portal.config.model.ModelUnmarshaller.unmarshall(ModelUnmarshaller.java:50) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.NewPortalConfigListener.fromXML(NewPortalConfigListener.java:655) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.NewPortalConfigListener.getConfig(NewPortalConfigListener.java:565) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.NewPortalConfigListener.createPortalConfig(NewPortalConfigListener.java:453) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.UserPortalConfigService.createUserPortalConfig(UserPortalConfigService.java:346) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.UserPortalConfigService.createGroupSite(UserPortalConfigService.java:320) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.portal.config.GroupPortalConfigListener.preSave(GroupPortalConfigListener.java:113) ~[exo.portal.component.portal-3.5.6-PLF.jar:3.5.6-PLF]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.invokeListenersToSavedGroup(OrganizationIntegrationService.java:1149) ~[platform-component-organization-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.syncGroup(OrganizationIntegrationService.java:405) ~[platform-component-organization-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.syncAllGroups(OrganizationIntegrationService.java:339) ~[platform-component-organization-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.organization.integration.OrganizationIntegrationService.start(OrganizationIntegrationService.java:164) ~[platform-component-organization-4.0.2.jar:4.0.2]
        	at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) ~[na:na]
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_27]
        	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_27]
        	at org.exoplatform.container.LifecycleVisitor.traverse(LifecycleVisitor.java:100) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.LifecycleVisitor.start(LifecycleVisitor.java:170) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:554) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.ExoContainer.start(ExoContainer.java:275) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.PortalContainer.start(PortalContainer.java:683) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.ExoContainer.start(ExoContainer.java:263) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.RootContainer.createPortalContainer(RootContainer.java:681) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.container.RootContainer.createPortalContainers(RootContainer.java:346) [exo.kernel.container-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator$1.run(PortalContainersCreator.java:52) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator$1.run(PortalContainersCreator.java:50) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedAction(SecurityHelper.java:290) [exo.kernel.commons-2.4.5-GA.jar:2.4.5-GA]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator.createPortalContainers(PortalContainersCreator.java:50) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.exoplatform.platform.server.tomcat.PortalContainersCreator.lifecycleEvent(PortalContainersCreator.java:39) [plf-tomcat-pc-creator-listener-4.0.2.jar:4.0.2]
        	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800) [catalina.jar:7.0.42]
        	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.42]
        	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.42]
        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_27]
        	at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_27]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_27]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_27]
        	at java.lang.Thread.run(Thread.java:662) [na:1.6.0_27]
        Caused by: org.xmlpull.v1.XmlPullParserException: entity reference name can not contain character <' (position: TEXT seen ...<portal-name>/R&D<... @27:23) 
        	at org.xmlpull.mxp1.MXParser.parseEntityRef(MXParser.java:2222) ~[xpp3-1.1.4c.jar:na]
        	at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1275) ~[xpp3-1.1.4c.jar:na]
        	at org.xmlpull.mxp1.MXParser.nextToken(MXParser.java:1100) ~[xpp3-1.1.4c.jar:na]
        	at org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.nextToken(XMLPullReaderFactory.java:277) ~[jibx-run-1.2.5.jar:na]
        	... 47 common frames omitted
        

      In GateIn tomcat standalone, we can reproduce as follow

      • Edit the [webapps/portal.war!/WEB-INF/conf/organization/organization-configuration.xml] to add new group whose name contains ampersand.
      • Start GateIn server
        -> The same exception as above

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                vstorm83 Vu Viet Phuong
                Reporter:
                vstorm83 Vu Viet Phuong
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours Time Not Required
                  2h