You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to connect from Android device to Windows (server 2008 standard SP2 build 6002) and trying to call list() method of SmbFile - it gives NPE on line 137 of SmbShareInfo class (leading from line 164 of SmbEnumerationUtil class) on Android.
Using version 2.1 of jcifs-ng.
Properties of jcifs-ng set: "jcifs.smb.client.useExtendedSecurity" - "false", "jcifs.smb.client.useSMB2Negotiation" - "true", "jcifs.resolveOrder" - "DNS".
I will be very grateful if someone can tell why this can be and what string does it need in line 137 of SmbShareInfo? And maybe how to avoid this NPE?
Thank you.
NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference, stack:
jcifs.internal.smb1.net.SmbShareInfo.hashCode(SmbShareInfo.java:137), java.util.Collections.secondaryHash(Collections.java:3405),
java.util.HashMap.containsKey(HashMap.java:325),
java.util.HashSet.contains(HashSet.java:138),
jcifs.smb.SmbEnumerationUtil.doShareEnum(SmbEnumerationUtil.java:164), jcifs.smb.SmbEnumerationUtil.doEnum(SmbEnumerationUtil.java:222),
jcifs.smb.SmbEnumerationUtil.list(SmbEnumerationUtil.java:247),
jcifs.smb.SmbFile.list(SmbFile.java:1133)
And if I'm trying to connect to "smb://host_name/folder_name" and get SmbFile list() it returns error: jcifs.smb.SmbException: 0xC000026E, stack:
jcifs.smb.SmbTransportImpl.checkStatus2(SmbTransportImpl.java:1436), jcifs.smb.SmbTransportImpl.checkStatus(SmbTransportImpl.java:1547), jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1005),
jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1518),
jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:407),
jcifs.smb.SmbTreeImpl.send(SmbTreeImpl.java:472),
jcifs.smb.SmbTreeConnection.send0(SmbTreeConnection.java:399),
jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:314),
jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:294),
jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:130),
jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:117), jcifs.smb.DirFileEntryEnumIterator2.open(DirFileEntryEnumIterator2.java:94), jcifs.smb.DirFileEntryEnumIteratorBase.(DirFileEntryEnumIteratorBase.java:67), jcifs.smb.DirFileEntryEnumIterator2.(DirFileEntryEnumIterator2.java:56), jcifs.smb.SmbEnumerationUtil.doEnum(SmbEnumerationUtil.java:227),
jcifs.smb.SmbEnumerationUtil.list(SmbEnumerationUtil.java:247),
jcifs.smb.SmbFile.list(SmbFile.java:1133)
Some debugging had shown that NPE on line 137 of SmbShareInfo class is rising when jcifs-ng trying to get name of root folder (e.g. ADMIN$), when local user with access to only one public folder is trying to connect. When domain user connecting - there's no NPE...
The text was updated successfully, but these errors were encountered:
That commit should fix the null pointer exception when the share name is null, however the question is how we end up with an null name in the first place, any chance you can provide a traffic capture (pcap)?
When trying to connect from Android device to Windows (server 2008 standard SP2 build 6002) and trying to call list() method of SmbFile - it gives NPE on line 137 of SmbShareInfo class (leading from line 164 of SmbEnumerationUtil class) on Android.
Using version 2.1 of jcifs-ng.
Properties of jcifs-ng set: "jcifs.smb.client.useExtendedSecurity" - "false", "jcifs.smb.client.useSMB2Negotiation" - "true", "jcifs.resolveOrder" - "DNS".
I will be very grateful if someone can tell why this can be and what string does it need in line 137 of SmbShareInfo? And maybe how to avoid this NPE?
Thank you.
NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference, stack:
jcifs.internal.smb1.net.SmbShareInfo.hashCode(SmbShareInfo.java:137), java.util.Collections.secondaryHash(Collections.java:3405),
java.util.HashMap.containsKey(HashMap.java:325),
java.util.HashSet.contains(HashSet.java:138),
jcifs.smb.SmbEnumerationUtil.doShareEnum(SmbEnumerationUtil.java:164), jcifs.smb.SmbEnumerationUtil.doEnum(SmbEnumerationUtil.java:222),
jcifs.smb.SmbEnumerationUtil.list(SmbEnumerationUtil.java:247),
jcifs.smb.SmbFile.list(SmbFile.java:1133)
And if I'm trying to connect to "smb://host_name/folder_name" and get SmbFile list() it returns error: jcifs.smb.SmbException: 0xC000026E, stack:
jcifs.smb.SmbTransportImpl.checkStatus2(SmbTransportImpl.java:1436), jcifs.smb.SmbTransportImpl.checkStatus(SmbTransportImpl.java:1547), jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1005),
jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1518),
jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:407),
jcifs.smb.SmbTreeImpl.send(SmbTreeImpl.java:472),
jcifs.smb.SmbTreeConnection.send0(SmbTreeConnection.java:399),
jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:314),
jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:294),
jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:130),
jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:117), jcifs.smb.DirFileEntryEnumIterator2.open(DirFileEntryEnumIterator2.java:94), jcifs.smb.DirFileEntryEnumIteratorBase.(DirFileEntryEnumIteratorBase.java:67), jcifs.smb.DirFileEntryEnumIterator2.(DirFileEntryEnumIterator2.java:56), jcifs.smb.SmbEnumerationUtil.doEnum(SmbEnumerationUtil.java:227),
jcifs.smb.SmbEnumerationUtil.list(SmbEnumerationUtil.java:247),
jcifs.smb.SmbFile.list(SmbFile.java:1133)
Some debugging had shown that NPE on line 137 of SmbShareInfo class is rising when jcifs-ng trying to get name of root folder (e.g. ADMIN$), when local user with access to only one public folder is trying to connect. When domain user connecting - there's no NPE...
The text was updated successfully, but these errors were encountered: