Approach 2 is working fine so far. (No, SLSB isn't an option for me at this moment). Thanks again for your reply.
Thanks Denis, for those links. Now I know why those mysterious NPE occurred randomly in earlier version, glad to know they are fixed already. This issue of mine however seems not related.