aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1793) Blueprint interceptors do not work anymore
Date Mon, 03 Dec 2018 14:13:00 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16707255#comment-16707255
] 

ASF GitHub Bot commented on ARIES-1793:
---------------------------------------

cschneider closed pull request #670: [ARIES-1793] Upgrade to blueprint-core 1.10.0
URL: https://github.com/apache/karaf/pull/670
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pom.xml b/pom.xml
index 81f8d40447..36fcad37c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -218,7 +218,7 @@
         <aries.application.api.version>1.0.0</aries.application.api.version>
         <aries.application.management.version>1.0.0</aries.application.management.version>
         <aries.blueprint.api.version>1.0.1</aries.blueprint.api.version>
-        <aries.blueprint.core.version>1.9.0</aries.blueprint.core.version>
+        <aries.blueprint.core.version>1.10.0</aries.blueprint.core.version>
         <aries.blueprint.core.compatibility.version>1.0.0</aries.blueprint.core.compatibility.version>
         <aries.blueprint.cm.version>1.2.0</aries.blueprint.cm.version>
         <aries.blueprint.web.version>1.0.1</aries.blueprint.web.version>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>            Assignee: Guillaume Nodet
>            Priority: Blocker
>             Fix For: blueprint-core-1.10.0
>
>         Attachments: aries-interceptor.patch
>
>
> I have committed a project on Github to illustrate the issue : [https://github.com/nicolas-dutertry/test-jpa]
> This project contains a blueprint bundle with a bean TestRepository annotated with @PersistenceContext.
This bean is then injected into another bean TestServiceImpl which is then published as an
osgi service :
> {code:xml}
>     <jpa:enable/>
>     <tx:enable/>
>     <!-- This bean contains a @PersistenceContext EntityManager -->
>     <bean id="testRepository" class="com.dutertry.test.karaf.jpa.service.impl.TestRepository"/>
>     <bean id="testService" class="com.dutertry.test.karaf.jpa.service.impl.TestServiceImpl">
>         <property name="testRepository" ref="testRepository"/>
>     </bean>
>     <service interface="com.dutertry.test.karaf.jpa.service.TestService" ref="testService"/>
> {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 instance is not a proxy. Thus when using
testService, the following error occurs:
> {code:java}
> java.lang.IllegalStateException: Need active coordination
>     at org.apache.aries.jpa.support.impl.EMSupplierImpl.get(EMSupplierImpl.java:81)
~[?:?]
>     at org.apache.aries.jpa.support.osgi.impl.EmProxy.invoke(EmProxy.java:38) ~[?:?]
>     at com.sun.proxy.$Proxy77.createQuery(Unknown Source) ~[?:?]
>     at Proxy4c2993b8_dc6f_46b4_8e62_524dc0ad05f5.createQuery(Unknown Source) ~[?:?]
>     at com.dutertry.test.karaf.jpa.service.impl.TestRepository.list(TestRepository.java:26)
~[?:?]
>     at com.dutertry.test.karaf.jpa.service.impl.TestServiceImpl.list(TestServiceImpl.java:25)
~[?:?]
>     at com.dutertry.test.karaf.jpa.cmd.ListPersonCommand.execute(ListPersonCommand.java:24)
~[?:?]
>     at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
~[?:?]
>     at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
~[?:?]
>     at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
~[?:?]
>     at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) ~[?:?]
>     at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) ~[?:?]
>     at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) ~[?:?]
>     at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) ~[?:?]
>     at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
>     at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:?]
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:?]
>     at java.lang.Thread.run(Thread.java:748) [?:?]{code}
>  
> After some investigation, I have found that this bug is due to the resolution 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)

Mime
View raw message