Tuesday, September 25, 2018

How to Solve UnrecognizedPropertyException: Unrecognized field, not marked as ignorable - JSON Parsing Error using Jackson

While parsing JSON string received from one of our RESTful web services, I was getting this error "Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "person" (class Hello$Person), not marked as ignorable". After some research, I found that this is one of the common error while parsing JSON document using Jackson open source library in Java application. The error messages say that it is not able to find a suitable property name called "person" in our case, let's first take a look at the JSON we are trying to parse, the class we are using to represent the JSON document and the error message itself.

Error Message:
Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "person" (class Hello$Person), not marked as ignorable (4 known properties: , "id", "city", "name", "phone"])

Spring Framework Certification FAQ - Frequently asked Questions Answers for Java Developers

If you are a Java developer, working in Spring framework and thinking to become a certified Spring professional but couldn't to do it in the past due to expensive mandatory training provided by Pivotal and its partners then there is a good news for you. From 10th May 2017, Pivotal made the Spring Core training optional for appearing to Spring certification exam, which means, now, it's not mandatory to take Spring training for Spring certifications (see here). Similar to Oracle's Java certifications, you can become a Pivotal certified Spring Professional by just buying the exam vouchers and scheduling your exam online using examlocal.com from anywhere in the world.

Monday, September 24, 2018

How to find a Process Listening on a Specific Port in Linux? netstat and lsof command examples

In Linux, many times, you want to find out the PID of a process which is listening on a port e.g. if multiple tomcat servers are running on a host and you have to kill that process, but in order to kill that process you need the process id, how do you find the PID of the tomcat listening on port 8080? There are many Linux commands to find the process using a specific port, but I'll share what I use. I always use the netstat command with -p option, which displays process id of the process listening on a port. Btw, netstat is not the only command to find all processes using a particular port, you can also use the lsof command for the same purpose.

Top 5 Free Data Structure and Algorithm Courses for Java and C Programmers

Data Structure and Algorithm is one of the essential topics for programmers, both to get a job and do well on Job. A good knowledge of data structure and algorithm is the foundation of writing good code. If you are familiar with essential data structures e.g. array, string, linked list, tree, map and advanced data structure e.g. tries, AVL trees etc and know when to use which data structure and compute the CPU and memory cost of your code in terms  Even though you don't need to write your own array, linked list or hashtable, given every major programming SKD provides them e.g. JDK or C++ STL library, you will need to understand them so that you can use them in right place. Using a right data structure can drastically improve the performance of an algorithm.

Sunday, September 23, 2018

Top 5 Database design and Modelling Books for Programmers and DBAs of All level

The database design and modeling are one of those topics which rarely gets the attention they deserve, especially at the start of the project, but once things have gone out of hand then everybody talks about that. Comments like - this database are designed poorly, it is not performing well, you cannot add a new column easily etc becomes very common. The most problem with database design is that it is mainly done by application developers e.g. Java or C++ developer who knows SQL but they are not the expert of how to design tables and schema. The Database admins or DBAs know database and SQL better than application programmers but they focus on the admin part of the database rather on application part e.g. designing tables and relations between them, which is left to the application developer.

The best Course to Learn Spring Security 5 for Experienced Java Developers

If you are a Java Spring developer and working with Spring Security then you may be familiar with the "Learn Spring Security" course by Eugen Paraschiv of Baeldung.com. It is one of the most advanced and comprehensive courses on Spring Security and the best part of this course is that Eugen always keeps it up-to-date with new Spring Security release. Now that version Spring Security 5 is out - he has updated his course to use new features of Spring Security 5. Btw, there is some really cool new functionality coming in Spring Security 5 for the reactive programming model, and many other improvements and new features. But, the most important one is the release of OAuth2.