[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


jcifs null pointer exception

Posted on 2014-08-20
Medium Priority
Last Modified: 2014-08-24

I am under windows environment and i am using intellij. I had to extract jcifs classes and i did and the following code doesn't give any compiler error but once I run my code, it fails as follows:

NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("mydomain","test", "test");
                    SmbFile smbFile = new SmbFile(path,auth);
                    SmbFileOutputStream smbfos = new SmbFileOutputStream(smbFile);
                    smbfos.write("testing....and writing to a file".getBytes());
                    System.out.println("completed ...nice !");

Open in new window

2014-08-20 19:59:39,219 ERROR - java.lang.NoClassDefFoundError: jcifs/smb/NtlmPasswordAuthentication

Open in new window

My settings is as follows:
Question by:jazzIIIlove
  • 2
LVL 86

Expert Comment

ID: 40274981
jcifs null pointer exception

But you don't have that ...

2014-08-20 19:59:39,219 ERROR - java.lang.NoClassDefFoundError: jcifs/smb/NtlmPasswordAuthentication

Open in new window

I don't see any sign from your code that the jcifs classes are actually in the classpath
LVL 12

Author Comment

ID: 40275682
How can i verify this? (Via Windows as i code in Windows)
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 40275885
You just did verify it ;) (That jcifs in not in the classpath)

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question