Objectify context not started / ObjectifyFilter missing
Filters apply to requests. Your servlet init method is not being called in the context of a request, so the ObjectifyFilter is not being run - notice it's not in your stacktrace.
Get rid of the oFactory.begin()
in your contextInitialized()
, that is not the correct use of that method.
If you want to use Objectify within your servlet init()
, run your code within ObjectifyService.run()
:
ObjectifyService.run(new VoidWork() {
public void vrun() {
myObj = new MyObject();
myObj.loadEverything();
}
});
This will set up & tear down the Objectify context in the same way that the filter does.