[
https://issues.apache.org/jira/browse/ARIES-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164541#comment-13164541
]
Timothy Ward commented on ARIES-796:
------------------------------------
The patch above would definitely work, but doesn't address the full problem. I
see two necessary actions:
1. Fix the AbstractPropertyPlaceholder so that it can cope with metadata that
isn't mutable. This should provide useful debug when it finds immutable
metadata.
2. Fix the JPA namespace handler so it doesn't add non-mutable objects into the
metadata graph.
> 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
> Assignee: Timothy Ward
> 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