geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (GERONIMO-4727) Setting a parameterized pojo in blueprint throws exception
Date Mon, 06 Jul 2009 19:01:15 GMT

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

Guillaume Nodet resolved GERONIMO-4727.
---------------------------------------

    Resolution: Fixed

Such constructions have been explicitely forbidden.
The reason is that there is no way to make sure if the objects in the list are actually compatible
with what the generic information provides.
The only way to get around such a problem is to register a custom converter to convert to
the generic type.


> Setting a parameterized pojo in blueprint throws exception
> ----------------------------------------------------------
>
>                 Key: GERONIMO-4727
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4727
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>            Reporter: Gert Vanthienen
>         Attachments: GERONIMO-4727.diff, GERONIMO-4727.diff
>
>
> When the setter of property uses a parameterized type (e.g. *{{setLruList(LruList<PaxLoggingEvent>
events)}}*) and the bean being injected is the raw type (e.g. *{{new LruList()}}*, we get:
this exception:
> {noformat}
> org.osgi.service.blueprint.container.ComponentDefinitionException: 
> Unable to convert property value from org.apache.felix.karaf.gshell.log.LruList to 
> org.apache.felix.karaf.gshell.log.LruList<org.ops4j.pax.logging.spi.PaxLoggingEvent>
for injection 
> public void org.apache.felix.karaf.gshell.log.VmLogAppender.setEvents(org.apache.felix.karaf.gshell.log.LruList)
>         at org.apache.geronimo.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:604)
>         at org.apache.geronimo.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:571)
>         at org.apache.geronimo.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:552)
>         at org.apache.geronimo.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:501)
>         at org.apache.geronimo.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:62)
>         at org.apache.geronimo.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
>         at org.apache.geronimo.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:62)
>         ...
> {noformat}

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


Mime
View raw message