Ant import failure with classcastexception

I am trying to import an existing any build file & than run ant target from Gradle as a gradle task.
My existing ant target calls ant java task fork , but it fails with below error:

java.lang.ClassCastException: cannot be cast to
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I feel this is some classpath issue. In my gradle file i have no dependencies defined as I want to run exisiting ant flow from gradle.