cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] LDAP configuration in 2.1 Problem!

jey
Champ in-the-making
Champ in-the-making
Hi everyone!

I have migrated my Alfresco installation from 2.0 to 2.1R1 and I have the following problem:

The LDAP import doesn't work anymore!
The authentication still work fine, but their is no more import performed!

I have look a the new wiki page https://gva-alfresco/alfresco/faces/jsp/browse/browse.jsp and it seems that the configuration has change. In particular the scheduler bean.
Now it seems that it should be done this way:

<bean id="ldapGroupTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
       <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>
       <property name="startDelay">
           <value>60000</value>
       </property>
       <property name="repeatInterval">
           <value>3600000</value>
       </property>
   </bean>

<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
       <property name="triggers">
           <list>
               <ref bean="tempFileCleanerTrigger" />
               <ref bean="ftsIndexerTrigger" />
               <ref bean="indexRecoveryTrigger" />
               <ref bean="indexBackupTrigger" />
               <ref bean="ldapGroupTrigger" />
           </list>
       </property>
       <property name="waitForJobsToCompleteOnShutdown">
           <value>true</value>
       </property>
       <property name="configLocation">
           <value>classpath:alfresco/domain/quartz.properties</value>
       </property>
   </bean>

But the sample file given with 2.1 is still using the old syntax
<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>300000</value>
        </property>
        <!– Repeat every hour –>
        <property name="repeatInterval">
            <value>3600000</value>
        </property>
        <!– Commented out to disable
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        –>
    </bean>

Does anyone knows how I could fix this???

Thanks,
jey.
2 REPLIES 2

jey
Champ in-the-making
Champ in-the-making
I also want to add that there is no error in the log, even after I have turned t debug the log4j property related to ldap…

😞

The import just don append …

But users can log in alfresco…

(I am sure that it is not performed because I have try this on a new instance of alfresco, and no user is created, except when someone log in alfresco)

jey
Champ in-the-making
Champ in-the-making
Ok I'll reply again myself 🙂

In version 2.1RC it seems that the bean schedulerFactory is supposed to be launch by the boostrap, and should not start automatically as it was in version 2.0.

But nothing seems to be done during the bootstrap !

<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
        <property name="waitForJobsToCompleteOnShutdown">
            <value>true</value>
        </property>
        <property name="configLocation">
            <value>classpath:alfresco/domain/quartz.properties</value>
        </property>
        <property name="schedulerName">
            <value>DefaultScheduler</value>
        </property>
        <!– Do not auto start the scheduler - this is done at the end of the bootstrap process –>
        <property name="autoStartup">
            <value>false</value>
        </property>
    </bean>

So to solve the problem, expecting for a real fix, I turned the value of autoStartup to true.

Now It work as expected.

Hope this help someone, and I am waiting for another release fixing this or some explanation of this bug.

BB, jey