Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0133211868 for ; Wed, 30 Jul 2014 13:07:14 +0000 (UTC) Received: (qmail 68486 invoked by uid 500); 30 Jul 2014 13:07:13 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 68451 invoked by uid 500); 30 Jul 2014 13:07:13 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 68435 invoked by uid 99); 30 Jul 2014 13:07:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2014 13:07:13 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lightguard.jp@gmail.com designates 209.85.192.53 as permitted sender) Received: from [209.85.192.53] (HELO mail-qg0-f53.google.com) (209.85.192.53) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2014 13:07:11 +0000 Received: by mail-qg0-f53.google.com with SMTP id q107so1390010qgd.12 for ; Wed, 30 Jul 2014 06:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+NDULMz/iRsVewOHsj7oTGGZAAWRwY9lagNafgyfQQ8=; b=hjr4+ntPoFtoGb3tTpJGNjkoi5uOvzRNFPFnmwKbckR5U93L8sYXlCjNXDOWDKM6WI ftDqwu+0zxcbzQBK0EZVJ20qxL6P5B923fO591k6TIHkph8VqPqOVWCdvKCvVVeveZpY cgETVCTKcCG/j2J72TI5sHEGX1UjZJ1/GP4U9IjWi2s5v9ktP9akk1/I2ADDUn/UMy+L tNhVAcOf2vDYaemaGe1S5XKHK+9MgDdZeTZ389PSQDwhiLT+jSHL/2U40oOjuLnaJ27u KTKRSEFO+zguqf02I404h6XAeTw6FKkavrd126HXNP4EafLAmNBxFdikDvTHMJWcxXlH WBDQ== MIME-Version: 1.0 X-Received: by 10.140.89.48 with SMTP id u45mr6153442qgd.47.1406725606554; Wed, 30 Jul 2014 06:06:46 -0700 (PDT) Received: by 10.140.89.80 with HTTP; Wed, 30 Jul 2014 06:06:46 -0700 (PDT) In-Reply-To: <53D79A5A.4040403@gmail.com> References: <53D79A5A.4040403@gmail.com> Date: Wed, 30 Jul 2014 07:06:46 -0600 Message-ID: Subject: Re: DS SecurityInterceptor with DS ExceptionHandler in an ear deployment From: Jason Porter To: "users@deltaspike.apache.org" Content-Type: multipart/alternative; boundary=001a11c127781347a204ff68d428 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c127781347a204ff68d428 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sounds like an isolation problem between the EJB module and the web module. Off the top if my head I can think of nothing else besides what you're doing to fix that. On Tuesday, July 29, 2014, Rainer Sch=C3=B6n = wrote: > Hello > > I am using a DS SecurityInterceptor in both modules (ejb and war) and one > DS ExceptionHandler in the web module. Since [DELTASPIKE-449] is closed, > security violations integrate with DS exception handling. Now my problem: > If a security violation in the ejb module is detected, DS does not find t= he > ExceptionHandler in the web module. Instead of an AccessDeniedException I > get an IllegalStateException in the web layer: > > Could not find beans for Type=3Dclass xx.xxxxx.FacesExceptionHandler and > qualifiers:[] [1] > > org.apache.deltaspike.core.api.provider.BeanProvider. > getContextualReference(BeanProvider.java:150) > org.apache.deltaspike.core.api.provider.BeanProvider. > getContextualReference(BeanProvider.java:119) > org.apache.deltaspike.core.api.provider.BeanProvider. > getContextualReference(BeanProvider.java:100) > org.apache.deltaspike.core.impl.exception.control. > HandlerMethodImpl.notify(HandlerMethodImpl.java:194) > org.apache.deltaspike.core.impl.exception.control. > ExceptionHandlerBroadcaster.executeHandlers(ExceptionHandlerBroadcaster. > java:153) > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ... more > > Within the web module, the exception handler works fine. Any regular CDI > events thrown in the ejb module are delivered to listeners in the web > module without any problem. > > My workaround for the moment is an ExceptionHandler in the ejb module > catching the AccessDeniedException, mark the event as handled, extract th= e > original event and throw it manually. Throwing it again with any of the > ExceptionEvent throwing methods results in the same error as described > above. > > The error is reproducible easily. My configuration is GF4 and DS 1.0.0. > > Any better ideas? > > Regards, Rainer > > [1] > @RequestScoped > @ExceptionHandler > public class FacesExceptionHandler { > ... > --=20 Jason Porter http://en.gravatar.com/lightguardjp --001a11c127781347a204ff68d428--