karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Blueprint/JPA : Need active coordination error
Date Mon, 14 May 2018 09:12:25 GMT
Ooops, I forgot this one :/

Sorry about that. I'm adding to my daily TODO.

Regards
JB

On 05/14/2018 11:02 AM, DUTERTRY Nicolas wrote:
> Hi JB,
> 
>  
> 
> Do you have any update on that issue ?
> 
>  
> 
> Regards,
> 
> --
> 
> Nicolas Dutertry
> 
>  
> 
> *De :*Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> *Envoyé :* lundi 23 avril 2018 13:29
> *À :* user@karaf.apache.org
> *Cc :* user@karaf.apache.org
> *Objet :* RE: Blueprint/JPA : Need active coordination error
> 
>  
> 
> Thanks.
> 
> I'm still in vacation for a couple of days. I will take a look end of this week
> when back.
> 
> Regards
> 
> JB
> 
> Le 23 avr. 2018, à 15:16, DUTERTRY Nicolas <nicolas.dutertry@soprahr.com
> <mailto:nicolas.dutertry@soprahr.com>> a écrit:
> 
> Hi,
> 
> I have opened an issue in aries jira : https://issues.apache.org/jira/browse/ARIES-1793
> 
> Regards,
> --
> Nicolas Dutertry
> 
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net] 
> Envoyé : jeudi 12 avril 2018 14:38
> À : user@karaf.apache.org
> Objet : Re: Blueprint/JPA : Need active coordination error
> 
> Thanks I will take a look asap (I'm in vacation now ;)).
> 
> Regards
> JB
> 
> On 04/12/2018 02:03 PM, DUTERTRY Nicolas wrote:
> 
>  Here is full stack trace :
>  
>  java.lang.IllegalStateException: Need active coordination
>   at org.apache.aries.jpa.support <http://org.apache.aries.jpa.support>.impl.EMSupplierImpl.get(EMSupplierImpl.java:81)
~[?:?]
>   at org.apache.aries.jpa.support <http://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) [?:?]
>  
>  --
>  Nicolas Dutertry
>  
>  
>  -----Message d'origine-----
>  De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net] 
>  Envoyé : jeudi 12 avril 2018 13:51
>  À : user@karaf.apache.org
>  Objet : Re: Blueprint/JPA : Need active coordination error
>  
>  Hi Nicolas,
>  
>  I'm surprised it's not a proxy: it should be a Aries Proxy.
>  
>  Where the ISE is coming from ?
>  
>  Regards
>  JB
>  
>  On 04/12/2018 01:47 PM, DUTERTRY Nicolas wrote:
> 
>  Hi,
> 
>   
> 
>  Yesterday I ran into an error with the new Karaf 4.2.0. This error 
>  seems to be related to blueprint 1.9.0 (the error does not occur in Karaf 4.1.5).
> 
>   
> 
>  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 :
> 
>     
> 
>      <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"/>
> 
>   
> 
>  With Karaf 4.1.5 the instance of TestRepository injected in 
>  testService is a 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 :
> 
>  java.lang.IllegalStateException: Need active coordination
> 
>   
> 
>  Do you think it is a blueprint bug or is it forbidden to inject a jpa 
>  bean into another bean in the same blueprint context ?
> 
>   
> 
>  Regards,
> 
>  --
> 
>  Nicolas Dutertry
> 
>  Sopra HR Software - http://www.soprahr.com/
> 
>   
> 
> 
>  
>  --
>  Jean-Baptiste Onofré
>  jbonofre@apache.org
>  http://blog.nanthrax.net
>  Talend - http://www.talend.com
>  
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message