cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

The filename, directory name, or volume label syntax is incorrect

Former Member
0 Likes
1,894

Caused by: java.lang.IllegalArgumentException: java.io.IOException: The filename, directory name, or volume label syntax is incorrect at de.hybris.platform.util.MediaUtil.isValidParentChildRelationship(MediaUtil.java:329) ~[coreserver.jar:?] at de.hybris.platform.util.MediaUtil.composeOrGetParent(MediaUtil.java:293) ~[coreserver.jar:?] at de.hybris.platform.media.storage.impl.LocalFileMediaStorageStrategy.store(LocalFileMediaStorageStrategy.java:120) ~[coreserver.jar:?] at de.hybris.platform.jalo.media.MediaDataStoreCommand.execute(MediaDataStoreCommand.java:157) ~[coreserver.jar:?] at de.hybris.platform.jalo.media.MediaManager.storeMedia(MediaManager.java:284) ~[coreserver.jar:?] at de.hybris.platform.servicelayer.media.impl.DefaultMediaService$3.execute(DefaultMediaService.java:580) ~[coreserver.jar:?] at de.hybris.platform.tx.Transaction.execute(Transaction.java:1187) ~[coreserver.jar:?] at de.hybris.platform.tx.Transaction.execute(Transaction.java:1152) ~[coreserver.jar:?] at de.hybris.platform.servicelayer.media.impl.DefaultMediaService.setStreamForMedia(DefaultMediaService.java:566) ~[coreserver.jar:?] ... 142 more Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect at java.io.WinNTFileSystem.canonicalize0(Native Method) ~[?:1.8.0_71] at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428) ~[?:1.8.0_71] at java.io.File.getCanonicalPath(File.java:618) ~[?:1.8.0_71] at de.hybris.platform.util.MediaUtil.isValidParentChildRelationship(MediaUtil.java:320) ~[coreserver.jar:?] at de.hybris.platform.util.MediaUtil.composeOrGetParent(MediaUtil.java:293) ~[coreserver.jar:?] at de.hybris.platform.media.storage.impl.LocalFileMediaStorageStrategy.store(LocalFileMediaStorageStrategy.java:120) ~[coreserver.jar:?] at de.hybris.platform.jalo.media.MediaDataStoreCommand.execute(MediaDataStoreCommand.java:157) ~[coreserver.jar:?] at de.hybris.platform.jalo.media.MediaManager.storeMedia(MediaManager.java:284) ~[coreserver.jar:?] at de.hybris.platform.servicelayer.media.impl.DefaultMediaService$3.execute(DefaultMediaService.java:580) ~[coreserver.jar:?] at de.hybris.platform.tx.Transaction.execute(Transaction.java:1187) ~[coreserver.jar:?] at de.hybris.platform.tx.Transaction.execute(Transaction.java:1152) ~[coreserver.jar:?] at de.hybris.platform.servicelayer.media.impl.DefaultMediaService.setStreamForMedia(DefaultMediaService.java:566) ~[coreserver.jar:?] ... 142 more

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

Hi,

By looking into the source code

 private static boolean isValidParentChildRelationship(File parent, File child) {
         if (parent == null) {
             throw new IllegalArgumentException("parent can't be null");
         } else if (child == null) {
             throw new IllegalArgumentException("child can't be null");
         } else {
             try {
                 String parentPath = parent.getCanonicalPath();
                 String childPath = child.getCanonicalPath();
                 return FilenameUtils.directoryContains(parentPath, childPath);
             } catch (IOException var4) {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Error during checking parent-child relationship {parent: '" + parent + "', child: '" + child + "'");
                 }
 
                 throw new IllegalArgumentException(var4);
             }
         }
     }

Most likely, the media file that is referenced by the canonicalPath does not exist there.

Another level of investigation could be performed by enabling the DEBUG logging.

Would be much more easier to resolve if you can share the debug logging trace.