problemas al importar usuarios

cancel
Showing results for 
Search instead for 
Did you mean: 
jesa
Member II

problemas al importar usuarios

Hola a todos, le he dado a mi alfresco una acatualizacion a la version 3.1 Stable, pero en el momento en el que la aplicacion esta subiendo, me sale el siguiente error:


CompilerOracle: exclude org/apache/lucene/index/IndexReader$1.doBody
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger.mergeIndexes
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger.mergeDeletions
19/06/2009 04:50:00 PM org.apache.coyote.http11.Http11Protocol init
INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
19/06/2009 04:50:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1459 ms
19/06/2009 04:50:00 PM org.apache.catalina.core.StandardService start
INFO: Arrancando servicio Catalina
19/06/2009 04:50:00 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
19/06/2009 04:50:00 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo share.war de la aplicaci�n web
16:50:11,130  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
19/06/2009 04:50:11 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo alfresco.war de la aplicaci�n web
19/06/2009 04:50:12 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
16:50:17,977  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:alfresco/scheduled-jobs-context.xml]
Offending resource: class path resource [alfresco/application-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 25 in XML document from class path resource [alfresco/scheduled-jobs-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 25 in XML document from class path resource [alfresco/scheduled-jobs-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
   at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
   at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
   at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
   at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:351)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:171)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:145)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:130)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
   at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
   at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
   at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
   at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
19/06/2009 04:50:18 PM org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
19/06/2009 04:50:18 PM org.apache.catalina.core.StandardContext start
GRAVE: Fall� en arranque del Contexto [/alfresco] debido a errores previos
19/06/2009 04:50:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo studio.war de la aplicaci�n web
16:50:23,333  INFO  [web.scripts.DeclarativeRegistry] Registered 67 Web Scripts (+0 failed), 71 URLs
16:50:23,335  INFO  [web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 589.2744ms)
16:51:24,994  INFO  [web.scripts.DeclarativeRegistry] Registered 101 Web Scripts (+0 failed), 105 URLs
16:51:24,994  INFO  [web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 61638.41ms)
16:51:25,219  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
19/06/2009 04:51:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Arrancando Coyote HTTP/1.1 en puerto http-8080
19/06/2009 04:51:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 85483 ms
19/06/2009 04:54:17 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
19/06/2009 04:54:18 PM org.apache.catalina.core.StandardService stop
INFO: Parando servicio Catalina
19/06/2009 04:54:19 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080


estoy utilizando el siguiente codigo en el archivo "ldap-authentication-context.xml":


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
  <bean id="ldapInitialDirContextFactory" class="org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl">
    <property name="initialDirContextEnvironment">
      <map>
        <!– The LDAP provider –>
        <entry key="java.naming.factory.initial">
          <value>com.sun.jndi.ldap.LdapCtxFactory</value>
        </entry>
        <!– The url to the LDAP server –>
        <!– Note you can use space separated urls - they will be tried in turn until one works –>
        <!– This could be used to authenticate against one or more ldap servers (you will not know which one ….) –>
        <entry key="java.naming.provider.url">
          <value>ldap://unidatos.unionelectrica.com.co:389</value>
        </entry>
        <!– The authentication mechanism to use      –>
        <!– Some sasl authentication mechanisms may require a realm to be set –>
        <!–                java.naming.security.sasl.realm –>
        <!– The available options will depend on your LDAP provider –>
        <entry key="java.naming.security.authentication">
          <value>simple</value>
        </entry>
        <!– The id of a user who can read group and user information –>
        <entry key="java.naming.security.principal">
          <value>UE\10.1.2.97</value>
        </entry>
        <!– The password for the user defined above –>
        <entry key="java.naming.security.credentials">
          <value>F0c0e5r51p</value>
        </entry>
      </map>
    </property>
  </bean>
  <!– Ldap Syncronisation support –>

  <!–     There can be more than one stack of beans that import users or groups. For example, it may be easier to have a version of ldapPeopleExportSource, and associated beans, for each sub-tree of your ldap directory from which you want to        import users. You could then limit users to be imported from two or more sub tress and ignore users found else where. The same applies to the import of groups.        
  –>
  <!– Extract user information from LDAP and transform this to XML –>
  <bean id="ldapPeopleExportSource" class="org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource">
    <!–
      The query to select objects that represent the users to import. For Active Directory: (objectclass=user)
    –>
    <property name="personQuery">
      <value>(objectclass=user)</value>
    </property>
    <!–
      The search base restricts the LDAP query to a sub section of tree on the LDAP server.
      In this particular example we imported only the IT Department users.
    –>
    <property name="searchBase">
      <value>OU=UE,DC=unionelectrica,DC=com,DC=co</value>
    </property>
    <!–
      The unique identifier for the user.THIS MUST MATCH WHAT THE USER TYPES IN AT THE LOGIN PROMPT  
      For simple LDAP authentication this is likely to be "cn" or, less friendly, "distinguishedName"
      In Active Directory this is most likely to be "sAMAccountName". This property is mandatory and must appear on all users found by the query defined above.
    –>
    <property name="userIdAttributeName">
      <value>sAMAccountName</value>
    </property>
    <!– Services –>
    <property name="LDAPInitialDirContextFactory">
      <ref bean="ldapInitialDirContextFactory" />
    </property>
    <property name="personService">
      <ref bean="personService"></ref>
    </property>
    <property name="namespaceService">
      <ref bean="namespaceService" />
    </property>
    <!–
      This property defines a mapping between attributes held on LDAP user objects and the properties of user objects held in the repository. The key is the QName of an attribute in the repository, the value is the attribute name from the user/       inetOrgPerson/.. object in the LDAP repository.    
    –>
    <property name="attributeMapping">
      <map>
        <entry key="cm:userName">
          <!– Must match the same attribute as userIdAttributeName –>
          <value>sAMAccountName</value>
        </entry>
        <entry key="cm:firstName">
          <!– Active Directory: "givenName" –>
          <value>givenName</value>
        </entry>
        <entry key="cm:lastName">
          <!– Active Directory: "sn" –>
          <value>sn</value>
        </entry>
        <entry key="cm:email">
          <!– Active Directory: "???" –>
          <value>mail</value>
        </entry>
        <entry key="cm:organizationId">
          <!– Active Directory: "???" –>
          <value>o</value>
        </entry>
        <!– Always use the default –>
        <entry key="cm:homeFolderProvider">
          <null />
        </entry>
      </map>
    </property>
    <!– Set a default home folder provider. We configured it to create user home folder under  "User Homes" space–>
    <property name="attributeDefaults">
      <map>
        <entry key="cm:homeFolderProvider">
          <value>userHomesHomeFolderProvider</value>
        </entry>
      </map>
    </property>
  </bean>
  <!– Extract group information from LDAP and transform this to XML –>
  <bean id="ldapGroupExportSource" class="org.alfresco.repo.security.authentication.ldap.LDAPGroupExportSource">
    <!–
      The query to select objects that represent the groups to import.
      For Active Directory: (objectclass=group)
    –>
    <property name="groupQuery">
      <value>(objectclass=group)</value>
    </property>
    <!– The seach base restricts the LDAP query to a sub section of tree on the LDAP server. We reduced it to IT departments internal groups  –>
    <property name="searchBase">
      <value>OU=UE,DC=unionelectrica,DC=com,DC=co</value>
    </property>
    <!–        The unique identifier for the user. This must match the userIdAttributeName on the ldapPeopleExportSource bean above.        –>
    <property name="userIdAttributeName">
      <value>sAMAccountName</value>
    </property>
    <!–   An attribute that is a unique identifier for each group found. This is also the name of the group with the current group implementation.This is mandatory for any groups found.      
      Active Directory: "cn"  –>
    <property name="groupIdAttributeName">
      <value>cn</value>
    </property>
    <!–  The objectClass attribute for group members. For each member of a group, the distinguished name is given.The object is looked up by its DN. If the object is of this class it is treated as a group. –>
    <property name="groupType">
      <value>group</value>
    </property>
    <!– The objectClass attribute for person members.For each member of a group, the distinguished name is given.The object is looked up by its DN. If the object is of this class it is treated as a person –>
    <property name="personType">
      <value>user</value>
    </property>
    <property name="LDAPInitialDirContextFactory">
      <ref bean="ldapInitialDirContextFactory" />
    </property>
    <property name="namespaceService">
      <ref bean="namespaceService" />
    </property>
    <!–
      The repeating attribute on group objects (found by query or as sub groups) used to define membership of the group. This is assumed to hold distinguished names oF other groups or users/people; the above types are used to determine this.      
      Active Directory: "member"   –>
    <property name="memberAttribute">
      <value>member</value>
    </property>
    <property name="authorityDAO">
      <ref bean="authorityDAO" />
    </property>
  </bean>
  <!– Job definitions to import LDAP people and groups –>
  <!– The triggers register themselves with the scheduler –>
  <!– You may comment in the default scheduler to enable these triggers –>
  <!– If a cron base trigger is what you want seee scheduled-jobs-context.xml for examples. –>
  <!– Trigger to load poeple Note you can have more than one initial (context, trigger, import job and export source) seT. This would allow you to load people from more than one ldap store –>
  <bean id="ldapPeopleTrigger" class="org.alfresco.util.TriggerBean">
    <property name="jobDetail">
      <bean id="ldapPeopleJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
          <value>org.alfresco.repo.importer.ImporterJob</value>
        </property>
        <property name="jobDataAsMap">
          <map>
            <entry key="bean">
              <ref bean="ldapPeopleImport" />
            </entry>
          </map>
        </property>
      </bean>
    </property>
    <!– Start after 5 minutes of starting the repository –>
    <property name="startDelay">
      <value>180000</value>
    </property>
    <!– Repeat every hour –>
    <property name="repeatInterval">
      <value>3600000</value>
    </property>
    <property name="scheduler">
      <ref bean="schedulerFactory" />
    </property>
  </bean>
  <bean id="ldapGroupTrigger" class="org.alfresco.util.TriggerBean">
    <property name="jobDetail">
      <bean id="ldapGroupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
          <value>org.alfresco.repo.importer.ImporterJob</value>
        </property>
        <property name="jobDataAsMap">
          <map>
            <entry key="bean">
              <ref bean="ldapGroupImport" />
            </entry>
          </map>
        </property>
      </bean>
    </property>
    <!– Start after 5 minutes of starting the repository –>
    <property name="startDelay">
      <value>180000</value>
    </property>
    <!– Repeat every hour –>
    <property name="repeatInterval">
      <value>3600000</value>
    </property>
    <property name="scheduler">
      <ref bean="schedulerFactory" />
    </property>
  </bean>

  <!– The bean that imports xml describing people –>

  <bean id="ldapPeopleImport" class="org.alfresco.repo.importer.ExportSourceImporter">
    <property name="importerService">
      <ref bean="importerComponentWithBehaviour" />
    </property>
    <property name="transactionService">
      <ref bean="transactionComponent" />
    </property>
    <property name="authenticationComponent">
      <ref bean="authenticationComponent" />
    </property>
    <property name="exportSource">
      <ref bean="ldapPeopleExportSource" />
    </property>

    <!– The store that contains people - this should not be changed –>
    <property name="storeRef">
      <value>${spaces.store}</value>
    </property>

    <!– The location of people nodes within the store defined above - this should not be changed –>
    <property name="path">
      <value>/${system.system_container.childname}/${system.people_container.childname}</value>
    </property>

    <!– If true, clear all existing people before import, if false update/add people from the xml –>
    <property name="clearAllChildren">
      <value>false</value>
    </property>
    <property name="nodeService">
      <ref bean="nodeService" />
    </property>
    <property name="searchService">
      <ref bean="searchService" />
    </property>
    <property name="namespacePrefixResolver">
      <ref bean="namespaceService" />
    </property>


    <property name="caches">
      <set>
        <ref bean="permissionsAccessCache" />
      </set>
    </property>
  </bean>

  <!– The bean that imports xml descibing groups –>

  <bean id="ldapGroupImport" class="org.alfresco.repo.importer.ExportSourceImporter">
    <property name="importerService">
      <ref bean="importerComponentWithBehaviour" />
    </property>
    <property name="transactionService">
      <ref bean="transactionComponent" />
    </property>
    <property name="authenticationComponent">
      <ref bean="authenticationComponent" />
    </property>
    <property name="exportSource">
      <ref bean="ldapGroupExportSource" />
    </property>
    <!– The store that contains group information - this should not be changed –>
    <property name="storeRef">
      <value>${alfresco_user_store.store}</value>
    </property>

    <!– The location of group information in the store above - this should not be changed –>
    <property name="path">
      <value>/${alfresco_user_store.system_container.childname}/${alfresco_user_store.authorities_container.childname}</value>
    </property>

    <!– If true, clear all existing groups before import, if false update/add groups from the xml –>
    <property name="clearAllChildren">
      <value>true</value>
    </property>
    <property name="nodeService">
      <ref bean="nodeService" />
    </property>
    <property name="searchService">
      <ref bean="searchService" />
    </property>
    <property name="namespacePrefixResolver">
      <ref bean="namespaceService" />
    </property>

    <!– caches to clear on import of groups –>
    <property name="caches">
      <set>
        <ref bean="userToAuthorityCache" />
        <ref bean="permissionsAccessCache" />
      </set>
    </property>

    <!– userToAuthorityCache –>
  </bean>

</beans>


Por favor ayuda que lo requiero urgente para poder comenzar con este software a nivel de toda la empresa ya que esta version contiene muchas opcioens que requiero dentro del cambio organizacional de la empresa



De antemano Gracias
1 Reply
pjcaracuel_2349
Active Member II

Re: problemas al importar usuarios

Buenas,

El error es bastante significativo, pq no editas el fichero XML con un editor que te compruebe la integridad del XML en cuestion?

16:50:17,977  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:alfresco/scheduled-jobs-context.xml]
Offending resource: class path resource [alfresco/application-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 25 in XML document from class path resource [alfresco/scheduled-jobs-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 25 in XML document from class path resource [alfresco/scheduled-jobs-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.

Saludos