Cannot write to local filesystem using Batch file

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

The CSV writer is configured as:

image

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.

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)

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.

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.

Seems to be the same issue as this that was never solved, CSV Writer cannot write file when running in batch mode

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

3 Likes

HI @Iris ,

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

Thanks,
Bob

3 Likes

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