Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error finding classpath #16

Open
ChrisHird opened this issue May 18, 2021 · 0 comments
Open

Error finding classpath #16

ChrisHird opened this issue May 18, 2021 · 0 comments

Comments

@ChrisHird
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant