Hi Raghuraman,
If there are standard you don't need to recompile, i usually have had problem with my own classes dependences, but not with the other libraries. Are you using the same java version that in your PI?.
Sometimes i try a few things to try to enclose the problem. I upload the standard jars separately from my own classes. Later you can try to do a dummy test UDF to access to the problematic class or the class that uses it and it is public, only to check if the same issue happens or not.
Regards.