Glass jars are excellent for long term food storage. I like the gallon size with the wide mouth opening. I can easily scoop out the beans or rice. Make sure all of your beans, rice are bug free before you put them into a dry jar.
Any dampness inside the jar can cause molding.