geronimo-dev mailing list archives

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


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:
>             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(
>         at org.apache.geronimo.blueprint.container.BeanRecipe.setProperties(
>         at org.apache.geronimo.blueprint.container.BeanRecipe.setProperties(
>         at org.apache.geronimo.blueprint.container.BeanRecipe.internalCreate(
>         at org.apache.geronimo.blueprint.di.AbstractRecipe.create(
>         at org.apache.geronimo.blueprint.di.RefRecipe.internalCreate(
>         at org.apache.geronimo.blueprint.di.AbstractRecipe.create(
>         ...
> {noformat}

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

View raw message