aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holly Cummins (JIRA)" <>
Subject [jira] Commented: (ARIES-322) Anonymous beans in blueprint incompatible with JPA integration
Date Thu, 27 May 2010 16:10:40 GMT


Holly Cummins commented on ARIES-322:

Hi Lin, 

That's my cut and paste error - in the example I cut and pasted the context had been injected
by annotation scanning, but I did also see the same behaviour with unmodified Apache Aries
and XML like yours above. Sorry for the confusion!

Basically if the bean was declared inside the service element it didn't work but if I moved
it to be a freestanding element and added an id attribute things started working.  


> Anonymous beans in blueprint incompatible with JPA integration
> --------------------------------------------------------------
>                 Key: ARIES-322
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>            Reporter: Holly Cummins
> If I change the blueprint.xml for the JPA bundle of the blog sample to the following,

>  <service  interface="">
>    <bean class="">
>      <tx:transaction method="*" value="Required"/>
>    </bean>
>  </service>
> the samples fails with this error:
> [25/05/10 17:35:59:068 BST] 0000002c servlet       E
service SRVE0068E: Uncaught exception created in one of the service methods of the servlet
Edit Blog Author in application 55f218ea-219d-4ff1-af48-3b80c274765b.2. Exception created
: javax.persistence.TransactionRequiredException: No transaction currently active
> 	at org.apache.aries.jpa.container.context.transaction.impl.JTAPersistenceContextRegistry.getCurrentPersistenceContext(
> 	at org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.getPersistenceContext
>        at org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.persist(
> The problem seems to be the anonymous bean. This tripped me up pretty badly when I was
trying to write a new application, and I expect other users would hit it as well. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message