PREHEAT oven to 375ºF(190ºC).PUREE lentils in a blender with water.
IN a separate bowl, combine the base dry ingredients and cut in margarine until coarse crumbs form. Stir in egg and mix thoroughly. PRESS base dough into a 9″X13″ baking dish and bake for 10 minutes until firm.
COOL and spread a thin layer of jam over base.
REDUCE oven temperature to 350ºF(180ºC).
IN separate bowl, combine dry ingredients for lentil filing. Mix in lentil puree, vanilla and eggs. Add coconut and pecans if desired. Spread mixture on top of jam.
BAKE until firm, about 35 minutes.
COOL and cut into 18 bars.