IllegalArgumentException: ServletContext must not be null

199 views
Skip to first unread message

Robert Brendler

unread,
Apr 28, 2011, 9:21:17 AM4/28/11
to dpHibernate
Hi all,

I am trying to get dpHibernate 2.0 RC6 running on an Apache Tomcat
7.0.12 with BlazeDS 4.0.0.14931, Spring 3.0.5 and Spring-BlazeDS-
Integration 1.5.0.M2

I updated the lazyoverflow example to get it running with spring 3.0,
but keep running into this error. It seems that the login works, at
least I am getting an ApplicationUser object as response to the login
attempt. But as getRecentQuestions() is called the error appears
(Suppose thats the first lazy loading call). I could narrow it down to
FlexContext.getServletContext(); returning "null" in
SpringContextSerializerFactory.java line 110.

Quick fix to this (staying compatible to the current implementation)
was adding following code:
if(servletContext == null)
servletContext =
FlexContext.getMessageBroker().getServletContext();

Don't know if I am doing something ugly here, but works for me.
Reply all
Reply to author
Forward
0 new messages