This effect happens when Tomcat and Oracle are set to accept queries from the same port. Unfortunately, both Tomcat and Oracle listen by default to port 8080. Change the Tomcat port number in server.xml (in the $Catalina_Home/conf folder) to another value and the effect disappears.
You don't like waffles? Well, do you like this tiny ad?