# Cannot write to local filesystem using Batch file

**URL:** <https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643>\
**Category:** KNIME Analytics Platform\
**Tags:** batch\
**Created:** [August 26, 2021, 7:02pm UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643 "2021-08-26T19:02:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobpeers](https://forum-cdn.knime.com/user_avatar/forum.knime.com/bobpeers/32/39273_2.png) [@bobpeers](https://forum.knime.com/u/bobpeers)\
**Post date:** [August 26, 2021, 7:02pm UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/1 "2021-08-26T19:02:13Z")

</div>

Up until a few days ago I could happily run KNIME in batch mode and read and write Excel and CSV files to the local filesystem.  
In my case I was using a Windows Network share that was mounted as the F drive, the same drive as my KNIME workflow but outside the KNIME workflows.

Now when I run these workflows they run fine from the GUI but fail in a batch.

This test workflow is very simple and writes to the C drive and fails in the same way.

![image](https://forum-cdn.knime.com/uploads/default/original/3X/9/0/90e7c956e5560dfc952b717f1e4922e64e42a62b.png)

The CSV writer is configured as:

![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/5/f5912f9d5c15142a15e6eca81ed1d030b87bf631.png)

The error message shows that the CSV writer node could not be loaded but I don’t understand why this behaviour has changed.  
I’m running KNIME 4.4.1 with the latest updates applied.

```auto
aug. 26, 2021 8:54:08 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-frontend-jaxrs (168) [org.apache.cxf.jaxrs.JAXRSBindingFactory]
aug. 26, 2021 8:54:08 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (171) [org.apache.cxf.transport.http.HTTPTransportFactory, org.apache.cxf.transport.http.HTTPWSDLExtensionLoader, org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder, org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder, org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]
aug. 26, 2021 8:54:08 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http-hc (172) [org.apache.cxf.transport.http.HTTPConduitFactory, org.apache.cxf.transport.ConduitInitiator]
ERROR main FileWorkflowPersistor Unable to load node with ID suffix 2 into workflow, skipping it: null
java.lang.NullPointerException
        at java.base/java.util.regex.Pattern.quote(Unknown Source)
        at com.nodepit.knime.explorer.WebDavContentProvider.getFileStore(WebDavContentProvider.java:208)
        at org.knime.workbench.explorer.filesystem.ExplorerFileSystem.getStore(ExplorerFileSystem.java:116)
        at org.knime.workbench.explorer.ExplorerMountPointFileSystemAccess.getStore(ExplorerMountPointFileSystemAccess.java:288)
        at org.knime.workbench.explorer.ExplorerMountPointFileSystemAccess.isReadable(ExplorerMountPointFileSystemAccess.java:261)
        at org.knime.filehandling.core.util.MountPointFileSystemAccessService.isReadable(MountPointFileSystemAccessService.java:267)
        at org.knime.filehandling.core.defaultnodesettings.KNIMEConnection.checkMountpointConnected(KNIMEConnection.java:280)
        at org.knime.filehandling.core.defaultnodesettings.KNIMEConnection.isConnected(KNIMEConnection.java:259)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.findFirst(Unknown Source)
        at org.knime.filehandling.core.defaultnodesettings.filesystemchooser.config.MountpointSpecificConfig.getDefaultMountpoint(MountpointSpecificConfig.java:196)
        at org.knime.filehandling.core.defaultnodesettings.filesystemchooser.config.MountpointSpecificConfig.<init>(MountpointSpecificConfig.java:99)
        at org.knime.filehandling.core.defaultnodesettings.filesystemchooser.FileSystemChooserUtils.createConvenienceConfig(FileSystemChooserUtils.java:127)
        at org.knime.filehandling.core.defaultnodesettings.filesystemchooser.FileSystemChooserUtils.lambda$0(FileSystemChooserUtils.java:114)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
        at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.toArray(Unknown Source)
        at org.knime.filehandling.core.defaultnodesettings.filesystemchooser.FileSystemChooserUtils.createSpecificConfigs(FileSystemChooserUtils.java:117)
        at org.knime.filehandling.core.defaultnodesettings.filesystemchooser.FileSystemChooserUtils.createConfig(FileSystemChooserUtils.java:104)
        at org.knime.filehandling.core.defaultnodesettings.filechooser.AbstractSettingsModelFileChooser.<init>(AbstractSettingsModelFileChooser.java:149)
        at org.knime.filehandling.core.defaultnodesettings.filechooser.writer.SettingsModelWriterFileChooser.<init>(SettingsModelWriterFileChooser.java:125)
        at org.knime.filehandling.core.defaultnodesettings.filechooser.writer.SettingsModelWriterFileChooser.<init>(SettingsModelWriterFileChooser.java:148)
        at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2Config.<init>(CSVWriter2Config.java:155)
        at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeModel.<init>(CSVWriter2NodeModel.java:111)
        at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeFactory.createNodeModel(CSVWriter2NodeFactory.java:82)
        at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeFactory.createNodeModel(CSVWriter2NodeFactory.java:1)
        at org.knime.core.node.NodeFactory.callCreateNodeModel(NodeFactory.java:524)
        at org.knime.core.node.Node.<init>(Node.java:305)
        at org.knime.core.node.workflow.FileNativeNodeContainerPersistor.preLoadNodeContainer(FileNativeNodeContainerPersistor.java:197)
        at org.knime.core.node.workflow.FileWorkflowPersistor.loadNodeContainer(FileWorkflowPersistor.java:970)
        at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:8518)
        at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:8419)
        at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8373)
        at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8294)
        at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8267)
        at org.knime.core.node.workflow.WorkflowManager.loadProject(WorkflowManager.java:8112)
        at org.knime.core.node.workflow.BatchExecutor.loadWorkflow(BatchExecutor.java:740)
        at org.knime.core.node.workflow.BatchExecutor.runOne(BatchExecutor.java:907)
        at org.knime.core.node.workflow.BatchExecutor.runAll(BatchExecutor.java:889)
        at org.knime.core.node.workflow.BatchExecutor.mainRun(BatchExecutor.java:671)
        at org.knime.product.headless.KNIMEBatchApplication.runBatchExecutor(KNIMEBatchApplication.java:127)
        at org.knime.product.headless.KNIMEBatchApplication.start(KNIMEBatchApplication.java:80)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1461)

```

---

<div class="post-metadata">

**Author:** ![bobpeers](https://forum-cdn.knime.com/user_avatar/forum.knime.com/bobpeers/32/39273_2.png) [@bobpeers](https://forum.knime.com/u/bobpeers)\
**Post date:** [August 27, 2021, 6:20am UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/2 "2021-08-27T06:20:51Z")

</div>

I can confirm this works in KNIME 4.4.0 but NOT in 4.4.1 so it seems to be broken in the newest release.

---

<div class="post-metadata">

**Author:** ![bobpeers](https://forum-cdn.knime.com/user_avatar/forum.knime.com/bobpeers/32/39273_2.png) [@bobpeers](https://forum.knime.com/u/bobpeers)\
**Post date:** [August 27, 2021, 7:15am UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/3 "2021-08-27T07:15:52Z")

</div>

Update 2 - this was a false lead. I now have installed 4.4.0 on my laptop and 4.4.0 on a VM. On my laptop the identical workflow works fine but on the VM the workflow fails as it’s unable to load any of the new file handling nodes.  
Both writing to the same network location (F drive) with identical nodes and versions.

---

<div class="post-metadata">

**Author:** ![bobpeers](https://forum-cdn.knime.com/user_avatar/forum.knime.com/bobpeers/32/39273_2.png) [@bobpeers](https://forum.knime.com/u/bobpeers)\
**Post date:** [August 27, 2021, 8:53am UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/4 "2021-08-27T08:53:13Z")

</div>

Seems to be the same issue as this that was never solved, [CSV Writer cannot write file when running in batch mode](https://forum.knime.com/t/csv-writer-cannot-write-file-when-running-in-batch-mode/20456)

---

<div class="post-metadata">

**Author:** ![Iris](https://forum-cdn.knime.com/user_avatar/forum.knime.com/iris/32/14_2.png) [@Iris](https://forum.knime.com/u/Iris)\
**Post date:** [August 27, 2021, 12:42pm UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/5 "2021-08-27T12:42:04Z")

</div>

Hi @bobpeers

I just tried this and this works without a problem on my installation (KNIME Full Installation)

The NPE you posted has a reference to the nodepit explorer. Please uninstall this and try again.

Kind regards, Iris

---

<div class="post-metadata">

**Author:** ![bobpeers](https://forum-cdn.knime.com/user_avatar/forum.knime.com/bobpeers/32/39273_2.png) [@bobpeers](https://forum.knime.com/u/bobpeers)\
**Post date:** [August 27, 2021, 1:01pm UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/6 "2021-08-27T13:01:13Z")

</div>

HI @Iris ,

You’re a genius 🙂 I didn’t notice that error but uninstalling has fixed the problem.

Thanks,  
Bob

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [September 3, 2021, 1:02pm UTC](https://forum.knime.com/t/cannot-write-to-local-filesystem-using-batch-file/35643/7 "2021-09-03T13:02:00Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
