I guessing it is because you cannot name your SP sum since it is a reserved word. I tried your same code with a different name it and worked (I used command line but I expect it will be successful using JDBC as well):
You are entitled to your opinion. But you are not entitled to your own facts. -- Daniel Patrick Moynihan
Actually, the backticks on the procedure definition override the reservation on the name "sum", although it's stil better to use a (hopefully more descriptive) name and avoid that mess. There were no backticks or qualifiers on the Java code's SQL "call" statement, however, so the wrong "sum" was being referenced. Again, a more meaningful (and unreserved) procedure name would be preferable.
Also, lose the Class.forName(). It has probably been 15 years now since that statement became obsolete.
And for security's sake, use some other database user ID than root!
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.