Software Development Kit (SDK) and API Discussions

java.lang.ClassNotFoundException: com.google.common.io.NullOutputStream

ERKANAKSOY
6,542 Views

Hello,

I am starting to learn NetApp SDK for Java. I tried to run the Hello Ontapi sample but I get the following error. I have Oracle JDK 1.8 and latest Eclipse.

 

Error occurs at 

SystemGetVersionResponse resp = runner.run(req);

 

at com.netapp.nmsdk.client.ApiRunner.createApiInvocation(ApiRunner.java:153)

at com.netapp.nmsdk.client.ApiRunner.run(ApiRunner.java:131)

at com.netapp.nmsdk.client.ApiRunner.run(ApiRunner.java:105)

at helloOntapi.helloOntapi.main(helloOntapi.java:53)

Caused by: java.lang.ClassNotFoundException: com.google.common.io.NullOutputStream

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

... 5 more

 

 

3 REPLIES 3

marche1990
6,236 Views

Erkanaksoy,

 

In you rEclipse project you need to add the external JARs in the NMSDK/lib/external folder to the project. You will then find that the class will compile and run from Eclipse.

 

Hope this helps if you haven't solved the problem already.

 

Regards

Martin

RATNA_GUDLAVALLETI
5,834 Views

Hi Martin,

 

I am also faced this exception. I added both manageontap, nmsdk-runtime and ontap-api jars. Till now i faced this exception. Can yoi please help on this.

 

 

marche1990
5,766 Views

Ratna,

 

You need to have the following libraries in your class path

 

common/nmsdk-runtime-5.4P1.jar

external/commons-codec-1.4.jar

external/commons-io-2.0.1.jar

external/commons-lang-2.6.jar

external/guava-r08.jar

 

and then your DFM or ONTAP API jar for the version you are tring to communicate with. These can all be found in the lib folder for the SDK

 

Hope this helps

Martin

Public