We generally get error java.lang.NullPointer Exception while opening dynamic documents in Arbortext Editor in a linked session with Windchill. Clearing the cache or workspace sometimes resolves the issue. However, i do not believe that it has something to do with cache or workspace as it happens quite often.
What could be the reason and how to fix it?
You should probably report the issue to PTC, especially if you can find a reproducible case.
My gut feeling, without knowing anything about your setup, is there is something wrong with your custom code.
What version of editor? Can you give a little detail on your setup?