Uploaded image for project: 'Magnolia DAM Module'
  1. Magnolia DAM Module
  2. MGNLDAM-380

Incorrect/invalid filenames break the migration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2.2
    • 1.1.2
    • None
    • None

      Attached is a page which embeds a file with a weird name.

      The task MoveContentToDamMigrationTask tries to move the data to the dam, computes a path concatening the root path and the filename. From a JCR perspective the path is not valid.

      An exception is thrown, but not catched, which stopped the migration.

      2014-01-22 17:06:08,802 ERROR info.magnolia.module.InstallContextImpl           : > Unable to perform Migration task Move assets stored in the website ws to the dam
      javax.jcr.RepositoryException: Failed to resolve path home/product/features/open-source-cms/content/00/col2/0/teaserGroupItems/00/Magnolia Community Forums   Magnolia Community Forums  beta  relative to node /moved_uploaded
      	at org.apache.jackrabbit.core.NodeImpl.resolveRelativePath(NodeImpl.java:239)
      	at org.apache.jackrabbit.core.NodeImpl.resolveRelativeNodePath(NodeImpl.java:222)
      	at org.apache.jackrabbit.core.NodeImpl.hasNode(NodeImpl.java:2277)
      	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.hasNode(DelegateNodeWrapper.java:282)
      	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.hasNode(ContentDecoratorNodeWrapper.java:144)
      	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.hasNode(DelegateNodeWrapper.java:282)
      	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.hasNode(ContentDecoratorNodeWrapper.java:144)
      	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.hasNode(DelegateNodeWrapper.java:282)
      	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.hasNode(ContentDecoratorNodeWrapper.java:144)
      	at info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask.copyToDam(MoveContentToDamMigrationTask.java:262)
      	at info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask.handleUploadedNode(MoveContentToDamMigrationTask.java:226)
      	at info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask.handleUploadReferenceForNode(MoveContentToDamMigrationTask.java:209)
      	at info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask.handlePath(MoveContentToDamMigrationTask.java:186)
      	at info.magnolia.dam.setup.migration.MoveContentToDamMigrationTask.doExecute(MoveContentToDamMigrationTask.java:159)
      	at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:57)
      	at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:509)
      	at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:491)
      	at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:274)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:414)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:411)
      	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385)
      	at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:268)
      	at info.magnolia.module.ui.ModuleManagerNullUI.onStartup(ModuleManagerNullUI.java:66)
      	at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:149)
      	at info.magnolia.init.MagnoliaServletContextListener$1.doExec(MagnoliaServletContextListener.java:248)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:414)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:411)
      	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385)
      	at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:245)
      	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:171)
      	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:125)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
      	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: org.apache.jackrabbit.spi.commons.conversion.MalformedPathException: 'home/product/features/open-source-cms/content/00/col2/0/teaserGroupItems/00/Magnolia Community Forums   Magnolia Community Forums  beta ' is not a valid path: Trailing slashes not allowed in prefixes and names.
      	at org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:278)
      	at org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:122)
      	at org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver.getQPath(ParsingPathResolver.java:90)
      	at org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:98)
      	at org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:77)
      	at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQPath(DefaultNamePathResolver.java:82)
      	at org.apache.jackrabbit.core.SessionImpl.getQPath(SessionImpl.java:648)
      	at org.apache.jackrabbit.core.session.SessionContext.getQPath(SessionContext.java:338)
      	at org.apache.jackrabbit.core.NodeImpl.resolveRelativePath(NodeImpl.java:237)
      	... 44 more
      

        Acceptance criteria

              ehechinger Eric Hechinger
              nbarbe Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD