2 Replies Latest reply on Aug 22, 2007 9:28 AM by Stan Silvert

    "Null request object" exception when running with RMISecurit

    Pieter Kuijpers Newbie

      I'm using JSFUnit to test a JSF application running on JBoss 4.2.1.GA. The application needs to run with the RMISecurityManager, so JBoss is started with JAVA_OPTS set to

      export JAVA_OPTS="-Djava.security.manager=java.rmi.RMISecurityManager -Djava.security.policy=policy.all"


      When I try to run this very simple test:
       public void testGetClientFacade() throws Exception {
       ClientFacade client = new ClientFacade("/login.faces");
       assertNotNull(client);
       }
      

      I get the following error. When I run without the RMISecurityManager, the test runs fine.
      java.lang.IllegalStateException: Null request object
       org.apache.catalina.connector.RequestFacade.getAttribute(RequestFacade.java:259)
       com.sun.faces.context.RequestMap.remove(ExternalContextImpl.java:1079)
       com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:378)
       org.jboss.jsfunit.context.JSFUnitFacesContext.valueUnbound(JSFUnitFacesContext.java:201)
       org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1649)
       org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1207)
       org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1179)
       org.apache.catalina.session.StandardSessionFacade.removeAttribute(StandardSessionFacade.java:140)
       org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:92)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:585)
       org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
       java.security.AccessController.doPrivileged(Native Method)
       javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
       org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
       org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
       java.security.AccessController.doPrivileged(Native Method)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:585)
       org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
       java.security.AccessController.doPrivileged(Native Method)
       javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
       org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
       org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)