Closed vjorge closed 2 years ago
Hi,
i got the same error,
I use
SmbConfig config = SmbConfig.builder()....
and add the following code now:
.withDialects(SMB2Dialect.SMB_2_1, SMB2Dialect.SMB_2_0_2, SMB2Dialect.SMB_3_0)
SMB_2_1, SMB_2_0_2
is the default in version 0.10.0 !
SMB_3_1_1, SMB_3_0_2, SMB_3_0, SMB_2_1, SMB_2_0_2
is the default in version 0.11.3 !
So the problem in my case is the "SMB_3_1_1", I don't have a real explanation for this. Maybe it helps you.
P.S. smbj 0.10.0 works without this change, I need the change for 0.11.3
best regards Martin
@vjorge @Martin0815123 could you check the latest 0.11.5 release, which i believe has DFS related fixes.
Hi bangert,
you are right, with 0.11.5 the null pointer has disappeared (in my case)!
best regards Martin
Closing this issue, thanks for the ping. @vjorge If this persists, feel free to reopen.
I'm getting this error with 0.11.5 connecting to a DFS share.
I tried with .withDialects(SMB2Dialect.SMB_2_1, SMB2Dialect.SMB_2_0_2)
but it does not fix the issue for me.
Hi, I have a SMB server that has on the root share normal directories and other DFS based shares, when performing a directory list the error is thrown:
Cannot invoke "java.util.Set.contains(Object)" because the return value of "com.hierynomus.mssmb2.messages.SMB2CreateResponse.getFileAttributes()" is null
Debugging the code I could find that if fails on the following function:
When the response.getFileAttributes() is evaluated it throws an exception because the value of getFileAttributes() is null as well as any other folder related information, the SMB2CreateResponseContext Header contains:
dialect=null, creditCharge=1, creditRequest=0, creditResponse=33, message=SMB2_CREATE, messageId=62, asyncId=0, sessionId=1381004522554057, treeId=1, status=0xc0000257, flags=9, nextCommandOffset=0
I have tested with a DFS folder with and without permissions, with same error, is there a way to avoid code termination and detected that no permissions exist and create the Directory object anyway?
If I set the DFS folder as a part of the share path it works fine, but if is on the same level then it fails on getDiskShare().getFileInformation(DFSsharepath);
Many thanks.