/bin/bash /usr/local/nagios/libexec/host_config.sh -i host
Input the host address(IP):sas3.shield.local
Input the userID:usr
Input the password:
Confirm the password:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400
at com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:113)
at com.ibm.nagios.config.HostConfig.main(HostConfig.java:82)
Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
We had to update the script to add the jt400.jar to the class path for it to work. I think that is because you override the class path with the -cp option?
When running the host_config.sh script it errors
/bin/bash /usr/local/nagios/libexec/host_config.sh -i host Input the host address(IP):sas3.shield.local Input the userID:usr Input the password: Confirm the password: Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400 at com.ibm.nagios.config.HostConfig.Insert(HostConfig.java:113) at com.ibm.nagios.config.HostConfig.main(HostConfig.java:82) Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400 at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 2 more
We had to update the script to add the jt400.jar to the class path for it to work. I think that is because you override the class path with the -cp option?
!/bin/bash
java -cp /usr/local/nagios/libexec/jt400.jar:/usr/local/nagios/libexec/nagios4i.jar com.ibm.nagios.config.HostConfig $1 $2