java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
by mfoley from LinuxQuestions.org on (#6G7GX)
I'm a bit stumped. When I run a java program from the command line, it works fine. When I do so from a .procmailrc pipe it fails with the message:
Code:java.lang.ClassNotFoundException: com.mysql.cj.jdbc.DriverThe bash script run by the .procmailrc pipe shows the CLASSPATH:
Code:/srv/tomcat/lib/catalina.jar:/srv/tomcat/bin/tomcat-juli.jar:/srv/tomcat/lib/commons-lang-2.6.jar:/srv/tomcat/lib/mysql-connector-java-8.0.29.jar:/srv/tomcat/webapps/office/WEB-INF/lib/apache-ant-1.8.2.jarand this shows the mysql-connector-java-8.0.29.jar in the path. When I echo the CLASSPATH from the command line it is identical.
Why is the non-interactive run mode not finding this jarfile?
Code:java.lang.ClassNotFoundException: com.mysql.cj.jdbc.DriverThe bash script run by the .procmailrc pipe shows the CLASSPATH:
Code:/srv/tomcat/lib/catalina.jar:/srv/tomcat/bin/tomcat-juli.jar:/srv/tomcat/lib/commons-lang-2.6.jar:/srv/tomcat/lib/mysql-connector-java-8.0.29.jar:/srv/tomcat/webapps/office/WEB-INF/lib/apache-ant-1.8.2.jarand this shows the mysql-connector-java-8.0.29.jar in the path. When I echo the CLASSPATH from the command line it is identical.
Why is the non-interactive run mode not finding this jarfile?