Appium Driver Swipe method is throwing error

Try out ways mentioned in with latest versions appium server and java client