Questions tagged [smbj]

Use this tag if your question is related to Server Message Block (SMB2, SMB3) implementation in Java.

Server Message Block (SMB) is a network protocol for file, print and other services in computer networks.

The SMBJ is the Java implementation of this network protocol.

44 questions
4
votes
1 answer

Trouble writing to file with SMBJ

Please help. I am unable to create and write to a file using SMBJ. I'm getting this error: com.hierynomus.mssmb2.SMBApiException: STATUS_OBJECT_NAME_NOT_FOUND (0xc0000034): Create failed for Is this a Windows errors or an SMBJ error? Am…
Eric
  • 143
  • 1
  • 3
  • 9
3
votes
1 answer

LibGdx load Texture from SmbFile

I try to create a Gdx Texture with an image file located in a shared folder on my PC. The code works well on desktop app (but it works as well without using SmbFile...), but crash on android app. I obtain "no such file or directory" error. Does…
Dudule
  • 51
  • 2
3
votes
1 answer

smbj: How can I get subdirectories only?

I use https://github.com/hierynomus/smbj for samba access. I want get only the subfolders of my target directory. Whith following code I get "..", "." and all the files - is there an elegant way to get subdirectories only? SmbConfig config =…
1
vote
0 answers

Problem while trying to access files in sub-directories using 0.11.5 SMBJ library

I would like to check if a file exists in a particular directory in shared drive using SMBJ library. For example this is the file I want to check the existence of - \\server1\CF\Sub1\Sub2\Sub3\test.txt Below is the code snippet I'm using …
kola
  • 27
  • 7
1
vote
0 answers

SMB TreeID is invalid

When I'm trying to connect to an SmbFile using following code: final Properties props = new Properties(); props.setProperty("jcifs.smb.client.disablePlainTextPasswords", "false"); final PropertyConfiguration propertyConfig = new…
MDS
  • 11
  • 2
1
vote
1 answer

SMBJ unable to write file

Unable to write file to the sahred folder, i get the exception. com.hierynomus.mssmb2.SMBApiException: STATUS_ACCESS_DENIED (0xc0000022): Create failed for \10.x.x.x\XYZZZZZZ\xyz.txt I have verified that this account has complete access to that…
1
vote
0 answers

Unable to list the files from local to remote server using smbj library

I have tried to list the files in the local path using the library smbj, But unable to list & copy the local files to the remote file server. I am getting the error. Shared the Error Log for reference. My requirement is to change the "jcifs library"…
Maria
  • 297
  • 1
  • 5
  • 18
1
vote
0 answers

SMBJ Library and SLF4J: Failed to load class

I tried to connect the file server using the library smbj, I am getting the error "Failed to load class "org.slf4j.impl.StaticLoggerBinder"." Shared the Error Log for reference. My requirement is to change the "jcifs library" to "smbj library", the…
Maria
  • 297
  • 1
  • 5
  • 18
1
vote
1 answer

Recursive file search for designated extension

I am using SMBClient to connect to my SMB server with Java. How can I recursively scan my entire SMB share to get a listing of all files with an .mp4 extension? This is my code that only scans the one designated directory: private void…
Doctor Ford
  • 440
  • 1
  • 5
  • 17
0
votes
0 answers

SMB3/2 Server with Signing/Encryption as testserver

Is there a test suite for SMB3/2 available on the market that provides me with an SMB server that provides me with all possible combinations (signing / encryption etc.) to check if our software adapts correctly to all possible…
0
votes
0 answers

How to make SMB connection persistent with jcifs-ng?

I have a Quarkus app that retrieves data from a mysql database. I am adding a functionality which uses jcifs-ng to read & parse xml files on a shared drive (adding additional data to what is already retrieved from the DB). I have a SMBConnector.java…
ceid1987
  • 1
  • 1
0
votes
0 answers

How to write large file with SMBJ from buffered FileInputStream?

I have the following code, the file appears on the share and it grows in size, but the code never completes. I.e: System.out.println("Writing file done."); never executes. The transferTo(...) is a new method from Java 9+, which pretty much does the…
user432024
  • 4,392
  • 8
  • 49
  • 85
0
votes
1 answer

smbd (samba) refuse to do encryption although dialect 3.1.1 is used

I have java code that writes data to remote destination using smb2 (using java smbj 11.0.5). When destination is Windows shared folder, everything is working, and the messages are encrypted. When destination is Linux (with samba smbd version…
doronk
  • 101
  • 1
  • 4
0
votes
0 answers

java.lang.ClassNotFoundException: com.hierynomus.smbj.SMBClient cannot be found

I am developing an eclipse plugin. Within the plugin I have to access files in the shared drive, for that I'm using SMBJ java library. I have downloaded the jar and its dependencies from here and included it in the build path. I have checked if the…
kola
  • 27
  • 7
0
votes
1 answer

Trouble with setting file mode in SMBJ

I'm trying to set the file mode of a remote located file in a SMB share though SMBJ library. But I get STATUS_INVALID_PARAMETER error. This is my code snippet: Set fileAttributes = new…
1
2 3