Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wrapper of FacesServlet , throwing ApplicationAssociate ctor Exception..

843844Mar 25 2008 — edited May 28 2008
Hi ,
I have created a wrapper of FacesServlet , accordingly I have changes to web.xml to point to my WCFacesServlet class . Folowing is my WCFacesServlet .
public class WCFacesServlet extends HttpServlet{
  private FacesServlet delegate;
 
public void init(ServletConfig servletConfig) throws ServletException {
  delegate = new FacesServlet();
  delegate.init(servletConfig);
}
 
public void destroy() {
  delegate.destroy();
}
 
public ServletConfig getServletConfig() {
  return delegate.getServletConfig();
}
 
public String getServletInfo() {
 return delegate.getServletInfo();
}
 
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
  try {
    delegate.service(request, response);
  }catch(Throwable e) {
    if(e instanceof BusinessException){
      ((HttpServletResponse)response).sendRedirect(((HttpServletRequest)request).getContextPath() + "businessPageError.jsp");
    }else if (e instanceof SystemException){
      //goto another error page type
    }
  }
}
 
}
The above code ( FacesServlet wrapper ) works fine if application is deployed on TomCat 5.5.. But if I deploy the same application on WebSphere 6.1 is it throwing " ApplicationAssociate ctor not called in same callstack as Configure ".

This is exactly what is it throwing as exception :

"java.lang.IllegalStateException: ApplicationAssociate ctor not called in same callstack as FacesConfigParser.contextInitialized(). The configuration for your Configure Listener or Faces Servlet definitions in your deployment descriptor may be wrong. Please check section 10 of the JSF spec for more details."

Can u plz help me...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2008
Added on Mar 25 2008
3 comments
482 views