Category Archives: Java

java.lang.NoClassDefFoundError: javax/mail/Authenticator

OS: Fefora 21 Container: apache-tomcat-8.0.23 javamail related jar files: /usr/share/java/javax.mail/javax.mail.jar /usr/share/java/javamail/mail.jar /usr/share/java/javamail/javax.mail.jar Also had my own mail.jar in the $TOMCAT_HOME/lib. One workaround suggested adding the necessary mail.jar to the war file build.   I went ahead and added the mail.jar … Continue reading

Posted in Apache Tomcat, Java, Uncategorized | Leave a comment

Prepare SQL query example

//=========================================================== // Prepare a SQL query to insert a row into the breed table. //=========================================================== query = “INSERT INTO breed ” + “(thekey,” + “species_key,” + “breed_name,” + “breed_ext_id,” + “create_user,” + “create_stamp,” + “update_user,” + “update_stamp) ” + “VALUES(?,?,?,?,” … Continue reading

Posted in Java | Leave a comment

Android OkHttpClient with cache and cookie support

Instantiate the CustomOkClientImpl and call configureOkClientImpl to get the OkClient as shown in the following example.  The okhttp-1.3.0-jar-with-dependencies.jar and retrofit-1.4.1.jar packages are required.     Log.i(“ResetResults”, “call for new OkHttpClient()”);     CustomOkClientImpl custHttpClient = new CustomOkClientImpl();     OkClient … Continue reading

Posted in Android, Apache httpd, Java | Leave a comment

Java Programming Video Tutorials

Check out the Java programming video tutorials at http://www.caveofprogramming.com/

Posted in Java | Leave a comment