You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Ioannis Canellos (Updated) (JIRA)" <ji...@apache.org> on 2011/12/02 12:53:40 UTC

[jira] [Updated] (ARIES-796) PropertyPlaceHolder does not really like JPA elements

     [ https://issues.apache.org/jira/browse/ARIES-796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ioannis Canellos updated ARIES-796:
-----------------------------------

    Attachment: ARIES-796-patch.txt

I am attaching a small patch which checks if a bean property is assignable to a mutable bean property before casting.


                
> PropertyPlaceHolder does not really like JPA elements
> -----------------------------------------------------
>
>                 Key: ARIES-796
>                 URL: https://issues.apache.org/jira/browse/ARIES-796
>             Project: Aries
>          Issue Type: Bug
>    Affects Versions: blueprint-0.3.1
>            Reporter: Ioannis Canellos
>         Attachments: ARIES-796-patch.txt
>
>
> When using JPA, we usally pass the EntityManagerFactory to a bean using <jpa:unit> element.
> When we also define a property placeholder in the same blueprint.xml we result with tha class cast exception like the one below:
> java.lang.ClassCastException: org.apache.aries.jpa.blueprint.aries.impl.NSHandler$1 cannot be cast to org.apache.aries.blueprint.mutable.MutableBeanProperty
> 	at org.apache.aries.blueprint.ext.AbstractPropertyPlaceholder.processBeanMetadata(AbstractPropertyPlaceholder.java:116)[9:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.ext.AbstractPropertyPlaceholder.processMetadata(AbstractPropertyPlaceholder.java:91)[9:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.ext.AbstractPropertyPlaceholder.process(AbstractPropertyPlaceholder.java:85)[9:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:495)[9:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:314)[9:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[9:org.apache.aries.blueprint:0.3.1]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_29]
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_29]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_29]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_29]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_29]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
> 	at java.lang.Thread.run(Thread.java:680)[:1.6.0_29]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira