AssertError when running with Assertions on

We have created our own VaadinSpringServlet which extens VaadinServlet

In it we have the following method.

@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
super.service(request, response);

When we run this with Assertions on (java -ea …) we get the below error.

Some of the blogs I have read are indicating that I shold get a lock before making the call.

Others suggest that this is not required. Just need some guindance.


at com.vaadin.server.VaadinSession.getAttribute(

at com.vaadin.spring.server.SpringVaadinServlet.saveParameters(

at com.vaadin.spring.server.SpringVaadinServlet.createVaadinRequest(

at com.vaadin.server.VaadinServlet.service(

Yes, the thread should have the lock which is why you get the exception. The thing is, it should happen automatically. You can lock it yourself from the VaadinSession, but getting access to the session object is tricky.

Any reason why you aren’t using our official Spring add-ons instead?