Avoiding null variables while serializing with Jackson

I perform some CRUD operation by consuming REST APIs. Some of the entities I want to create do not have values for non-mandatory fields. When I pass those entities to servers, the call breaks with a NullPointerException. Hence I do not want to send a variable if it is null. We shall use JsonInclude annotation as shown below

String to;

Ansible: Missing sudo password

So here is the another error while getting the uname of the remote boxes

$ ansible webservers -b --become-user=myuser -m shell -a 'uname -a' -u myuser | FAILED | rc=-1 >>
Missing sudo password

After executing it with explicit become password it worked.

$ ansible webservers -b --become-user=myuser -m shell -a 'uname -a' -u myuser --extra-vars "ansible_sudo_pass=mypassword"

Failed to connect to the host via ssh: user@IP: Permission denied (publickey,password).”

I tried to ping all servers in Ansible

This is what I have in /etc/ansible/hosts file


My ping command failed.

$ ansible webservers -m ping | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: pandian@ Permission denied (publickey,password).",
    "unreachable": true

I updated the hosts file with credentials.

[webservers] ansible_ssh_pass=password ansible_ssh_user=myuser

Does it work? Not yet

$ ansible webservers -m ping | FAILED! => {
    "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"

I need to install

$ sudo apt-get install sshpass

Finally it works!

$ ansible webservers -m ping | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    "changed": false,
    "ping": "pong"

Grassfield Tamil Blog Aggregator

I’m happy to introduce the brand new blog aggregator www.grassfield.org. Today is the day 1 🙂

This aggregates Tamil and English blogs. This platform is running using my opensource project jAtomRss. I’m happy to come out with a website, finally.

Thanking Sivakumar and Kannan for their technical support and Sindu for testing the same!

Uncaught Error: Cannot pass parameter 4 by reference

$qry = "insert into feed_info (site_url, feed_xml_url, enabled) values (?,?,?)";
$stmt->bind_param('sss', $obj["site_url"], $obj["feed_xml_url"],0);

This was the PHP code that threw this exception.

Uncaught Error: Cannot pass parameter 4 by reference

PHP error: “Cannot pass parameter 2 by reference” The pass by value 0 caused the issue, when the method is expecting a variable / pass by reference.

The following code fixed the problem.

$stmt->bind_param('sss', $obj["site_url"], $obj["feed_xml_url"],$enabled);

Jackson JSON Capitalization: Unrecognized field


I need to covert the following snippet of JSON response to its relevant object. The key is ComponentType not componentType which didnt adhere to java variable standards.

"ComponentType": "APC_Ups",
"servers": [

Object coversion by Jackson failed with error com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “ComponentType”

Jackson tries to search for the variable name as per java variable naming standards. As there is no variable defined as ‘componentType’, it fails. Defining right variable name using @JsonProperty will solve this problem!

@JsonProperty (“ComponentType”)
String ComponentType;

Ref: Jackson JSON field mapping capitalization?

Chennai T Nagar

Hide blocks in jQuery

<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<p>I am a paragraph</p>
<content>I am a content</content>
<ul id="myid">
<li>I am an unordered list identified as myid</li>

<div class="myclass">
I am a div identified as myclass


The above snippet will help to hide the given blocks like in paragraph, content and unordered list blocks.

Initially it blocks everything. When we click any of the blocks, it will hide. After clicking the paragraph in the first line, this is what you see.

This helps to hide standard blocks using its tag or id or class names!