3 Replies Latest reply on Jan 24, 2014 11:15 AM by fcorneli

    JACC still not working

    fcorneli

      Within an EJB3 @Stateless session bean (packaged within an EAR) I call:

      private HttpSession getHttpSession() {
              HttpServletRequest httpServletRequest;
              try {
                  httpServletRequest = (HttpServletRequest) PolicyContext
                          .getContext("javax.servlet.http.HttpServletRequest");
              } catch (PolicyContextException e) {
                  throw new RuntimeException("JACC error: " + e.getMessage());
              }
              HttpSession httpSession = httpServletRequest.getSession();
              return httpSession;
          }
      

      This still gives me the following exception using the latest WildFly build from github:

      Caused by: java.lang.IllegalArgumentException: No PolicyContextHandler for key=javax.servlet.http.HttpServletRequest
          at javax.security.jacc.PolicyContext.getContext(PolicyContext.java:96) [jboss-jacc-api_1.5_spec-1.0.0.Beta1.jar:1.0.0.Beta1]
      

      Could this be fixed before WildFly 8.0.0.Final?