The problem you are having is almost certainly a problem with the software package you are installing. It could be that it got corrupted during download - in which case you should download it again or it could be that it's buggy in the first place - in which case you should report it back to the distributors. In any case the correct place for questions is the XMPP community - https://www.apachefriends.org/community.html - people on Ask Ubuntu won't be able to help beyond telling you that it's a software problem.
To be sure that software that you have downloaded isn't corrupted then check the checksums.
You can get XMPP checksums here - https://www.apachefriends.org/download.html
Instructions for checking checksums are here - Check hash (MD4, MD5, SHA-1, and CRC) on Ubuntu 12.04 and 12.10
As an alternative you could just go into the Ubuntu software centre and install
and then you would have a similar setup to the one that XAMPP gives you.
If your problems do persist even after installing the Ubuntu versions of the software then it is most likely a hardware corruption issue. Look up questions about that.