My grandpa hung pie pans around his garden (the aluminum ones) to help keep critters out of there. I guess it worked pretty well, since he kept doing it. That might work for trees, too; I don't know.
The peeing will work for awhile so will soap, human hair, some stuff in a can. But after they get used to smelling it they lose there fear. I tried all of the above and the electric fence. Only found one way to go.