Hi ,
Are there any errors in the gateway/rfc trace file of either of the systems .
For ABAP, SMGW will display the gateway trace and the work process logs may give a clue as well.
For Java, it should be under /usr/sap/<SID>/<INSTANCE>j2ee/cluster/server<node>/ with a name dev_jrfc or similar
Regards,
Suneeth