Your details are missing on how and exactly what you are attempting to do and why. If your on a BES server the 561 error may be associated with send issues. The 507 error indicates an OS function/loading error.
How are you connected and are you using the original Data cable?
So the suggestion is to do the following,
Download the OS for your model phone
Load it to the PC and install
Connect the BB with a fully charged battery
Using either BBSAK or JL_cmds wipe the phone.
Using BBSAK reload the OS
Do not rush and make sure the battery is NOT removed
Do not attempt to load any third party apps just basic load for a while.
Test the BB
If it works then your all set if not then it could be a defective BB Desktop Manager will not connect/detect my BB
If a JVM 507 error appears on the BlackBerry® smartphone, connection to the BlackBerry Desktop Software on a Mac computer might take up to 10 minutes. A standard PC may be less.
In the bottom left corner of the BlackBerry Desktop Software, the message Waiting for device to start appears. Keep the smartphone connected. After a number of minutes, the smartphone will display an hour glass followed by a prompt in the BlackBerry Desktop Software to select an update.
BlackBerry Device Software must be supported on the smartphone in order for updates to the smartphone using software loading over the wireless network. Earlier versions than BlackBerry Device Software are not supported for upgrade or reload using software loading over the wireless network. Upgrades must be wired.