I was trying to use tomcat connection pooling to establish a connection to MySQL database. I ran into "Bad handshake" SQLException. After few minutes on internet, I figured out that it was a problem with the driver. However, when I checked WEB-INF/lib directory I found latest mysql driver already placed in that directory. However, I found another older MySQL driver in <tomcat-dir>/common/lib . So tomcat was loading the old driver from classpath ahead of latest drivers in WEB-INF/lib directory. Once I updated the old driver with the latest version, everything worked fine. Note: removing the driver from <tomcat-dir>/common/lib did not fix the problem since tomcat connection pool needs to load the driver from common library location.
If you wanted to send emails to users but did not want to receive any replies to the email, you would need to setup a no-reply@domain.com email account. These kind of email ids are useful when sending emails containing forgotten passwords or activation code. Below are the steps for creating such account in Postfix. 1. Identify the file containing alias for Postfix First, make sure the following line in the ALIAS DATABASE section of the /etc/postfix/main.cf is NOT commented out: alias_maps = hash:/etc/aliases 2. Create an alias that redirects messages to /dev/null Edit /etc/aliases and add following entry devnull: /dev/null 3. Create a virtual email id Edit /etc/postfix/virtual and add following entry no-reply@domain.com devnull 4. refresh postfix alias and postfix cache Execute following commands. (You may require root privileges) > newaliases > postfix reload
Comments