Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-3901

Manual and scheduled backup fails when using file-based directory configuration

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Low Low
    • 3.0.0
    • 2.7.2, 2.8
    • None
    • None

      When using file-based directory configuration, any backup (manual or scheduled) fails and produces the following stacktrace:

      java.lang.ClassCastException: com.atlassian.crowd.dao.directory.ImmutableDirectory cannot be cast to com.atlassian.crowd.model.directory.DirectoryImpl
      #011at com.atlassian.crowd.migration.DirectoryMapper.exportXml(DirectoryMapper.java:51)
      #011at com.atlassian.crowd.migration.XmlMigrator.exportXml(XmlMigrator.java:36)
      #011at com.atlassian.crowd.migration.XmlMigrationManagerImpl.exportXml(XmlMigrationManagerImpl.java:106)
      #011at com.atlassian.crowd.manager.backup.DefaultBackupManager.backup(DefaultBackupManager.java:73)
      #011at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      #011at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      #011at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      #011at java.lang.reflect.Method.invoke(Method.java:601)
      #011at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      #011at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      #011at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      #011at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      #011at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      #011at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      #011at $Proxy48.backup(Unknown Source)
      #011at com.atlassian.crowd.manager.backup.BackupJob.executeInternal(BackupJob.java:30)
      #011at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)
      #011at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      #011at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      

      Workaround

      Disable scheduled backups and abstain from doing manual backups when using the file-based directory configuration.

            [CWD-3901] Manual and scheduled backup fails when using file-based directory configuration

            3.0.0 no longer includes file-based configuration

            Lukasz Pater added a comment - 3.0.0 no longer includes file-based configuration

            The file-based directory configuration and the backups are incompatible features at the moment. Unfortunately you have to chose one or the other.

            If file-based directory configuration is really necessary, then use the backup tool of your database to do the backups.

            I'd recommend not to use file-based directory configuration. It is an experimental feature introduced with CWD-3001 and may be removed in future releases of Crowd.

            Diego Berrueta added a comment - The file-based directory configuration and the backups are incompatible features at the moment. Unfortunately you have to chose one or the other. If file-based directory configuration is really necessary, then use the backup tool of your database to do the backups. I'd recommend not to use file-based directory configuration. It is an experimental feature introduced with CWD-3001 and may be removed in future releases of Crowd.

            joe added a comment -

            The file-based directory configuration is (was?) a temporary feature; I'm not sure we even documented it. If it is the underlying problem here, the quickest fix is likely to be to move back to database configuration.

            joe added a comment - The file-based directory configuration is (was?) a temporary feature; I'm not sure we even documented it. If it is the underlying problem here, the quickest fix is likely to be to move back to database configuration.

            DirectoryMapper assumes all directories are instances of DirectoryImpl.

            Diego Berrueta added a comment - DirectoryMapper assumes all directories are instances of DirectoryImpl .

              Unassigned Unassigned
              dberrueta Diego Berrueta
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: