Solar panels will work a lot longer than 3[edit: 0] years. I've got a batch here of 16 of them that are from the early 00's and that are still producing ~80% of their rated power. They're not even particularly good cells.
Lithium batteries will indeed likely not last for a decade but that has nothing to do with solar installations, though you could combine them (but you'd have a choice of chemistries and for stationary installations where weight and size are not usually the limiting factors you can do better than Lithium).