hierynomus / smbj

Server Message Block (SMB2, SMB3) implementation in Java
Other
713 stars 180 forks source link

Cannot invoke "java.util.Set.contains(Object)" because the return value of "com.hierynomus.mssmb2.messages.SMB2SessionSetup.getSessionFlags()" is null #780

Open IrynaZhumatiy opened 1 year ago

IrynaZhumatiy commented 1 year ago

Using smbj-0.3.0.

During connection to network share got an exeption:

java.lang.NullPointerException: Cannot invoke "java.util.Set.contains(Object)" because the return value of "com.hierynomus.mssmb2.messages.SMB2SessionSetup.getSessionFlags()" is null at com.hierynomus.smbj.session.Session.init(Session.java:74) ~[smbj-0.3.0.jar:?] at com.hierynomus.smbj.connection.Connection.authenticate(Connection.java:157) ~[smbj-0.3.0.jar:?]

Want to add that username has a permission from the shared drive folder and sub folders. Even created a txt file, write on it, and saved it for testing and it worked. Running SMB v3.

Could yuu please help me to figure out with this isuue?

IrynaZhumatiy commented 1 year ago

@hierynomus Could you please help me with this issue? Thanks in advance!

hierynomus commented 1 year ago

Hi Iryna, you might want to upgrade to the latest version, released last month. 0.3.0 is ancient and will contain bugs that are long since fixed.

IrynaZhumatiy commented 1 year ago

@hierynomus Thank you for the reply! This issue occures in production and currently there is no ability to upgrade the smbj version. I just want to understand the root cause because customer wants to add a new file share server and gets an error. With the similar file server everything works fine.