cancel
Showing results for 
Search instead for 
Did you mean: 

File Operation File Protocol Basic Auth "java.nio.file.NoSuchFileException:"

sijo_kokken
New Contributor

Hi Team,

We are using a File Operation snap with file:// protocol and Basic Auth Account. We have a groundplex running on windows server.

We are getting the following error.

Please guide us how to resolve the error.

File_Operation error0_json.txt (3.5 KB)

5 REPLIES 5

tlikarish
Employee
Employee

The file protocol is for working with the groundplex’s file system. Is that what you’re intending to do? From the URL and the mention of Basic Auth, it is looking like a bit like a file hosted on a different server. Is that the case? If so, then you’ll need to know the file servers protocol and configure the snap based on that.

Hello there,

Yes. We are trying to access files from shared drive and move it to a different location on the same server.

Have couple of following questions.

  1. Do you have any sample for working file operation snap with file protocol with sample url values. Do we need to give the complete path with filename for Target or just the target path till the folder is fine

Source : file:////somedirectory/somfile.csv
Target : file:////somedirectory/somfile.csv

vs
Source : file:////somedirectory/somfile.csv
Target : file:////somedirectory/

  1. Do we need to use any accounts for accessing share drive files using file protocol.

  2. Do you have any screen shots for how do we configure the share drives on windows server for accessing with file protocol.

  3. Whats the difference between file:///Z:/somedirectory/somefile.csv (if you have a Groundplex on Windows) and * file:////somedirectory/somfile.csv (if you’re using the Universal Naming Convention). When can we use Universal Naming Convention and can we use it with Windows server configuration.

  4. If we have not mapped our network drive to any of the Drives on the server and using generic network access user; can we still use the Groundplex on Windows configuration file path specifications.

It would be highly appreciable if we get some working pipelines with sample values. Thanks

hi, some sample values:
local c:\temp file:
file:///C:\temp\test.json
mapped drive Z:
file:///Z:\Testing\test.json
another machine using unc path (there are 4 / before host):
file:////host/Testing/test.json

Please ensure the read/write operations work on Windows Explorer first
then start jcc manually jcc.bat and test above from the snaps.
If jcc runs as a Windows Service, the Logon Account on that service
will need to have privs to access all of the above path.

Hi Mina,

[
{
“error”: “Failed to copy from file:////\\server.net\server-files\IT\Dev\DO370\Dev\2019\08\26\input\1.json to file:////\\server.net\server-files\IT\Dev\DO370\Dev\2019\08\26\output\1.json”,
“stacktrace”: “java.nio.file.AccessDeniedException: \\server.net\server-files\IT\Dev\DO370\Dev\2019\08\26\input\1.json\r\n\tat sun.nio.fs.WindowsException.translateToIOException(Unknown Source)\r\n\tat sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)\r\n\tat sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)\r\n\tat sun.nio.fs.WindowsFileCopy.copy(Unknown Source)\r\n\tat sun.nio.fs.WindowsFileSystemProvider.copy(Unknown Source)\r\n\tat java.nio.file.Files.copy(Unknown Source)\r\n\tat com.snaplogic.snaps.binary.FileOperation.moveOrCopy(FileOperation.java:350)\r\n\tat com.snaplogic.snaps.binary.FileOperation.lambda$moveOrCopyFailSafe$2(FileOperation.java:333)\r\n\tat net.jodah.failsafe.Functions$10.call(Functions.java:252)\r\n\tat net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145)\r\n\tat net.jodah.failsafe.SyncFailsafe.run(SyncFailsafe.java:81)\r\n\tat com.snaplogic.snaps.binary.FileOperation.moveOrCopyFailSafe(FileOperation.java:333)\r\n\tat com.snaplogic.snaps.binary.FileOperation.process(FileOperation.java:261)\r\n\tat com.snaplogic.snap.api.ExecutionUtil.process(ExecutionUtil.java:106)\r\n\tat com.snaplogic.snap.api.ExecutionUtil.execute(ExecutionUtil.java:70)\r\n\tat com.snaplogic.snap.api.SimpleSnap.execute(SimpleSnap.java:70)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:785)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.executeForSuggest(SnapRunnableImpl.java:632)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:841)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.access$000(SnapRunnableImpl.java:116)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl$1.run(SnapRunnableImpl.java:381)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl$1.run(SnapRunnableImpl.java:377)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat javax.security.auth.Subject.doAs(Unknown Source)\r\n\tat org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:376)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:116)\r\n\tat java.util.concurrent.FutureTask.run(Unknown Source)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\r\n\tat java.util.concurrent.FutureTask.run(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.lang.Thread.run(Unknown Source)\r\n”,
“reason”: “\\server.net\server-files\IT\Dev\DO370\Dev\2019\08\26\input\1.json”,
“resolution”: “Please address the reported issue.”,
“status_code”: “error”,
“snap_details”: {
“label”: “File Operation”,
“instance_id”: “323445db-2bfd-43ea-8149-7cb7d176152d”,
“class_id”: “com-snaplogic-snaps-binary-fileoperation”,
“build_tag”: “snapsmrc515”,
“views”: {
“in”: {

    },
    "out": {

    },
    "error": {
      "error0": {
        "count": 0
      }
    }
  }
}

}
]

This is the error stack trace which i am getting after using \\server.net\server-files\IT\Dev\DO370\Dev\2019\08\26\input\1.json path.

Please advice.