Going back to the source of the original problem, the reason the error was reported is that the value in the last memory address is not within a valid range. You can ignore the error but the PIC may behave strangely, depending on your application. It works like this:
1. Before the PIC leaves Microchip's factory, they test it and measure it's internal clock speed. Due to manufacturing tolerances, the frequency may be a little way off what it should be.
2. Cleverly, Microchip built a system into the silicon that allows the oscillator frequency to be pulled one way or the other to bring it back into specification. This is done by loading a value into the OSCCAL register.
3. Microchip code the value they calculated would calibrate the oscillator into an instruction "movlw xx" where xx is the calibration value, then store it in the highest memory address (the reset vector).
4. The memory addressing rolls over when it reaches the highest address and goes back to the beginning, address 0. So when reset it executes the instruction at the reset vector and goes to address zero with the calibration value in the W register.
5. Now it's up to you, the address is zero so it's a good place to start your program and the calibration value is available if you want to use it. If you use an external oscillator or crystal you don't need it so just program away to your hearts content, if you are using the internal oscillator, make your first instruction "movwf OSCCAL" and from then on the oscillator runs at the right frequency.
The reason you get the failure message is that the instruction in the highest memory address is not "movlw xx", almost certainly because the whole memory has been erased. When erasing the PIC, the Pickit2 will read the last address, erase the memory and then write it back again so the calibration value is preserved. It does have a facility to regenerate the value again if it gets wiped. I'm guessing here that it loads a small program into the PIC, times it's execution and works out the value needed to speed it up or slow it down, then erases the program and write the result into that last address. Variations on the real Pickit2 may not have this ability.
As a last resort, you can manually make it work by coding "org <highest memory address>" then "movlw 0" in your program to fake the value. Zero is the mid way calibration figure so it won't be too far off.
Brian.