Can you please check and confirm if "ds" value is coming as not null, you can add a breakpoint to confirm that. Also, if you'll "step-into" the req.setAttribute(DataSource.class.getName(), ds) line it'll take you to that exact internal class where it is failing. You can check which particular variab...