java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z

Where is an issue with the isValid() error on the driver which means that the JDBC driver is not JDBC 4 compatible. It could be your connection pool that might cause this issue. If there is a legacy support, then use that. OR Related Posts: Cursor Is Closed Exception In Java – Fixed (Resolved) Efficient way of closing resources (like Connection, File, Statement, Resultset, etc) MongoDB – Java Hello World Example org.apache.xerces.dom Deferred Document Impl getXmlStandalone Exception Java 8 Features


OSGi Tutorial

Here is a basic tutorial on How to build the OSGi Bundles using BNDTools? How to use the Fabric8 to do the deployment?   Related Posts: Maven Bundle – OSGI – An Internal Error Occurred – Opening Resource Camel – Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf.xml]


Identifying Deadlocks in Java / J2EE Application

The toughest situation a developer runs into finding out the deadlocked threads within the application and scenario that caused the deadlock. Identifying the deadlock is the critical step of this process. Thanks to the MBean which can give you the information on the deadlocked resources. Here is a quick sample daemon thread program which can find out the deadlocked threads for you. ThreadInfo class gives you various information about what monitor the current thread is waiting for and how long, etc. In order for the deadlock detection, start this DeadlockDetectionThread and start reporting when there is a deadlock. Related Posts: … Continue Reading →


How to format the JSON object output?

Jackson JSON objects are easy to format using the ObjectMapper. The below approaches will get you the formatted output of the JSON object using the Jackson processor. Solution# 1 Solution# 2 Please note that method defaultPrettyPrintingWriter on ObjectMapper now deprecated, use writerWithDefaultPrettyPrinter instead. Related Posts: JSON Encoding Issues in Spring / JSP / Servlet Maven Bundle – OSGI – An Internal Error Occurred – Opening Resource


New Line in Excel on Mac

EXCEL has the capability to add the new line character within the cell of a spreadsheet.  In MS Windows, we do that easily by pressing <ALT> and <ENTER>.  In MAC, adding the new line character needs one more extra key combination which is using <CONTROL>, <ALT / OPTION> and <ENTER / RETURN>. In summary, here is the shortcut for adding a new line within a cell of a spreadsheet. In windows: <ALT> and <ENTER> In MAC: <CONTROL>, <ALT / OPTION> and <ENTER / RETURN> Related Posts: Java Command Line Progress Bar Adding Options Dynamically to Select using JQuery iTunes 10.5 … Continue Reading →


Java 8 Features

Java / JDK 8 features are listed below. You can read more about these features at Java 8 Features. Summary of all the features: Lambda Expressions & Virtual Extension Methods Autoconf-Based Build System Lambda-Form Representation for Method Handles Compact Profiles Prepare for Modularization Leverage CPU Instructions for AES Cryptography Nashorn JavaScript Engine Mechanical Checking of Caller-Sensitive Methods Document JDK API Support and Stability Reduce Cache Contention on Specified Fields Remove the Permanent Generation Retire Some Rarely-Used GC Combinations Enhanced Verification Errors Reduce Class Metadata Footprint Small VM Fence Intrinsics Launch JavaFX Applications Generalized Target-Type Inference Annotations on Java Types DocTree … Continue Reading →


Eclipse Shortcut for Lowercase to Uppercase and Uppercase to lowercase

You might have wondered on how to do the lowercase to uppercase and also uppercase to lowercase in Eclipse. Unfortunately, it is not really listed anywhere in the quick access menus within eclipse as of this writing. Here is how you can convert the lowercase to uppercase using the shortcut keys and also convert lowercase to uppercase in Eclipse. Windows shortcut key for eclipse Convert to Lower case: CTRL+SHIFT+Y (CMD+SHIFT+Y on Mac OS X) Convert to Upper case: CTRL+SHIFT+X (CMD+SHIFT+X on Mac OS X) MAC OS shortcut key for eclipse Convert to Lower case: CMD+SHIFT+Y Convert to Upper case: CMD+SHIFT+X … Continue Reading →


LinkedIn Down

A rare sight of LinkedIn being Down

It is a rare sight of seeing the major network on a down state (potentially under a maintenance) which could be debatable. I do not think that these major players like linkedin would go down without a reason. Anyway, thought of sharing this rare moment and it was witnessed on March 20th, 2013 around 10:00 AM EDT.


The Extensive List of Eclipse Shortcut Keys

Eclipse has been so rich in functionality over the years and it is very widely used. Here is an extensive list of shortcut keys from eclipse which comes part of the bundle. Of course, you can customize your own short cut keys the way that you wanted. You can download the eclipse shortcut keys list as a PDF version. NOTE: This shortcut is applicable from Eclipse Version: Juno Service Release 1 onwards. Debugging Resume F8 Run to Line Ctrl+R Step Into F5 Step Into Selection Ctrl+F5 Step Over F6 Step Return F7 Terminate Ctrl+F2   Editing Ant Buildfiles Format Ctrl+Shift+F … Continue Reading →


Adding Key Value Pair to a Javascript Array

How to add a key / value pair to the Javascript array? This has been quite few questions always asked and it is very easy to accomplish this in Javascript. Those that are familiar with Java language, you can kind of equate this to a HashMap / Hashtable. There are multiple ways in which this can be accomplished. Before that, how to create the array object in JavaScript?.   The familiar way of accomplishing the javascript key value pair storing is as below. Approach 1: Key Value Pair in JavaScript NOTE: The quotes around the KEY is not mandatory. But … Continue Reading →