cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to write to file

Soumic_Mohanty
New Contributor II

I am able to read input files from a drive, where as while writing it to the same drive i have the below error. I have both read & write access to the drive.
Consolidated file - File Writer[630c7b8c5e736915c210eda5_acbb4c4e-db51-4c9f-a0de-357dc53f1b95 – dbd7fd81-a8ce-446f-9d5f-d35aafe3c94a]
com.snaplogic.snap.api.SnapDataException: Failed to write to file:////D:/S P L D/OUTPUT/_2023-01-18T11:16:56.514Z.csv
at com.snaplogic.snaps.binary.AbstractWriter.throwExceptionCantWrite(AbstractWriter.java:689)
at com.snaplogic.snaps.binary.AbstractWriter.writeData(AbstractWriter.java:558)
at com.snaplogic.snaps.binary.AbstractWriter.process(AbstractWriter.java:375)
at com.snaplogic.snaps.binary.AbstractWriter.doWork(AbstractWriter.java:325)
at com.snaplogic.snap.api.SimpleBinarySnap.execute(SimpleBinarySnap.java:57)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:812)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.execute(SnapRunnableImpl.java:586)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:877)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:436)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:120)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.FileNotFoundException: D:\S P L D\OUTPUT_2023-01-18T11:16:56.514Z.csv (The filename, directory name, or volume label syntax is incorrect)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:237)
at com.snaplogic.common.url.protocol.file.FileUrlConnection.getOutputStream(FileUrlConnection.java:144)
at com.snaplogic.snaps.binary.AbstractWriter.initOutputStream(AbstractWriter.java:853)
at com.snaplogic.snaps.binary.AbstractWriter.writeData(AbstractWriter.java:517)
… 14 more
Reason: Possible reasons can be failure in URL connection or file access denial, detail: D:\S P L D\OUTPUT_2023-01-18T11:16:56.514Z.csv (The filename, directory name, or volume label
syntax is incorrect)
Resolution: Address the reported issue.

Error Fingerprint[0] = efp:com.snaplogic.snaps.binary.QZ3SSH-j
Error Fingerprint[1] = efp:java.io._ZHK6B8t

2 REPLIES 2

ljupcho_machko1
New Contributor III

Hi @Soumic_Mohanty ,
I assume that colon symbol in the target filename is causing this issue. Please try to replace colon “:” with underscore in the file name creation.

Hi ljupcho_machkovski,
I have replaced the colon “:”.
It worked with the underscore.
Thank you very much for your help.