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 (Created) (JIRA)" <ji...@apache.org> on 2011/12/02 11:59:40 UTC

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

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


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

        

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

Posted by "Ioannis Canellos (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166034#comment-13166034 ] 

Ioannis Canellos commented on ARIES-796:
----------------------------------------

Thanks Tim.
                
> 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
>             Fix For: 0.4
>
>         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

        

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

Posted by "Timothy Ward (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Ioannis Canellos (Updated) (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Timothy Ward (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Ward resolved ARIES-796.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.4
    
> 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
>             Fix For: 0.4
>
>         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

        

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

Posted by "Timothy Ward (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Ward reassigned ARIES-796:
----------------------------------

    Assignee: Timothy Ward
    
> 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