I found the problem. I had few System.out.println() and one of them was at the place shown below. Removing that solved the problem.
rule "Tax Rule"
when
calculateTax : calculateTax(
objOne : objOne,
objTwo : objTwo,
objThree : objThree
);
objFour : objFour();
System.out.println("debug");
then
...
end