Hi,
To explain you much better. JAVA is much different from ABAP.
ABAP is totally a DB and some binaries/kernel at OS level. Where as JAVA has both File system data as well as DB.
So JAVA has to be exported in source and imported in taget server. I have tried doing the way you were doing sometime back.. struggled for 4 days continuously. But i couldnt do it. Finally i had to do export and import. In the target system since File system (/usr/sap/<SID>/<instance>/j2ee) has many files and folders which will be in sync with hostname, DB, SID, etc.
515 return code is for incorrect or invalid database content. So your problem will be solved by exporting and importing java only.
Hope it helps. Please let us know the outcome of this.
Regards,
Kishore Soma