From dev-return-19808-apmail-aries-dev-archive=aries.apache.org@aries.apache.org Thu Apr 19 15:04:04 2018 Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56AD3184DA for ; Thu, 19 Apr 2018 15:04:04 +0000 (UTC) Received: (qmail 73961 invoked by uid 500); 19 Apr 2018 15:04:04 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 73927 invoked by uid 500); 19 Apr 2018 15:04:04 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 73908 invoked by uid 99); 19 Apr 2018 15:04:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2018 15:04:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AA0B4C6481 for ; Thu, 19 Apr 2018 15:04:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id iOkNQEwgYSzH for ; Thu, 19 Apr 2018 15:04:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1F19D5F188 for ; Thu, 19 Apr 2018 15:04:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3DA0EE014A for ; Thu, 19 Apr 2018 15:04:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 03D2D2120A for ; Thu, 19 Apr 2018 15:04:01 +0000 (UTC) Date: Thu, 19 Apr 2018 15:04:01 +0000 (UTC) From: "Nicolas Dutertry (JIRA)" To: dev@aries.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ARIES-1793) Blueprint interceptors do not work anymore MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Nicolas Dutertry created ARIES-1793: --------------------------------------- Summary: Blueprint interceptors do not work anymore Key: ARIES-1793 URL: https://issues.apache.org/jira/browse/ARIES-1793 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-core-1.9.0 Environment: Karaf 4.2.0 Reporter: Nicolas Dutertry Attachments: aries-interceptor.patch I have committed a project on Github to illustrate the issue : [https://git= hub.com/nicolas-dutertry/test-jpa] This project contains a blueprint bundle with a bean TestRepository annotat= ed with @PersistenceContext. This bean is then injected into another bean T= estServiceImpl which is then published as an osgi service : {code:xml} =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 {code} With Karaf 4.1.5 the instance of TestRepository injected in testService is = an aries proxy managing JPA stuff, but with Karaf 4.2.0 the injected instan= ce is not a proxy. Thus when using testService, the following error occurs: {code:java} java.lang.IllegalStateException: Need active coordination =C2=A0=C2=A0 =C2=A0at org.apache.aries.jpa.support.impl.EMSupplierImpl.get(= EMSupplierImpl.java:81) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.aries.jpa.support.osgi.impl.EmProxy.invoke= (EmProxy.java:38) ~[?:?] =C2=A0=C2=A0 =C2=A0at com.sun.proxy.$Proxy77.createQuery(Unknown Source) ~[= ?:?] =C2=A0=C2=A0 =C2=A0at Proxy4c2993b8_dc6f_46b4_8e62_524dc0ad05f5.createQuery= (Unknown Source) ~[?:?] =C2=A0=C2=A0 =C2=A0at com.dutertry.test.karaf.jpa.service.impl.TestReposito= ry.list(TestRepository.java:26) ~[?:?] =C2=A0=C2=A0 =C2=A0at com.dutertry.test.karaf.jpa.service.impl.TestServiceI= mpl.list(TestServiceImpl.java:25) ~[?:?] =C2=A0=C2=A0 =C2=A0at com.dutertry.test.karaf.jpa.cmd.ListPersonCommand.exe= cute(ListPersonCommand.java:24) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.karaf.shell.impl.action.command.ActionComm= and.execute(ActionCommand.java:84) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.karaf.shell.impl.console.osgi.secured.Secu= redCommand.execute(SecuredCommand.java:68) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.karaf.shell.impl.console.osgi.secured.Secu= redCommand.execute(SecuredCommand.java:86) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.felix.gogo.runtime.Closure.executeCmd(Clos= ure.java:571) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.felix.gogo.runtime.Closure.executeStatemen= t(Closure.java:497) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.felix.gogo.runtime.Closure.execute(Closure= .java:386) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:4= 17) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229= ) ~[?:?] =C2=A0=C2=A0 =C2=A0at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)= ~[?:?] =C2=A0=C2=A0 =C2=A0at java.util.concurrent.FutureTask.run(FutureTask.java:2= 66) ~[?:?] =C2=A0=C2=A0 =C2=A0at java.util.concurrent.ThreadPoolExecutor.runWorker(Thr= eadPoolExecutor.java:1149) ~[?:?] =C2=A0=C2=A0 =C2=A0at java.util.concurrent.ThreadPoolExecutor$Worker.run(Th= readPoolExecutor.java:624) ~[?:?] =C2=A0=C2=A0 =C2=A0at java.lang.Thread.run(Thread.java:748) [?:?]{code} =C2=A0 After some investigation, I have found that this bug is due to the resoluti= on of issue ARIES-1544. I have done a patch (see attached file) which solve= the issue I think. [^aries-interceptor.patch] Can you please integrate my patch or correct the issue another way ? -- This message was sent by Atlassian JIRA (v7.6.3#76005)