Difference while programatically running server and running server from server

Android : I have been using Appium 1.4.8 GUI to run appium server during the test execution. The test cases developed by me using the same were running successfully.
Moving to running the server programatically I am ending up getting stuck in identifying some or the other element which were previously/presently getting recognised using GUI server.

Any suggestions on to what I might be doing wrong or need to do??

Please post your logs from when you try to a test case with starting Appium programmatically.

Ideally this should not happen
Make sure that u run same server using program which u run manually
There may be some synchronization issues when appium server ran using program as it may be bit slow …