[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-1952) persistenceUnitProperties on EntityManagerFactory must be parameterized

Dan Allen (JIRA) jira-events at lists.jboss.org
Sun Sep 23 22:38:11 EDT 2007

     [ http://jira.jboss.com/jira/browse/JBSEAM-1952?page=all ]

Dan Allen updated JBSEAM-1952:

    Fix Version/s: 2.0.0.GA

> persistenceUnitProperties on EntityManagerFactory must be parameterized
> -----------------------------------------------------------------------
>                 Key: JBSEAM-1952
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1952
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0.CR1
>            Reporter: Dan Allen
>            Priority: Minor
>             Fix For: 2.0.0.GA
>         Attachments: JBSEAM-1952-v1.txt
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
> The XML configuration schema boast support for persistence-unit-properties on the EntityManagerFactory component. However, the configuration does not work because  persistenceUnitProperties is not parameterized and therefore the Seam map converter cannot figure out what to do. If key/value pairs are specified, Seam fails to start.
> Here is an example:
> <persistence:entity-manager-factory name="emf" persistence-unit-name="pu">
>   <persistence:persistence-unit-properties>
>     <key>hibernate.hbm2ddl.auto</key>
>     <value>create-drop</value>
>   </persistence:persistence-unit-properties>
> </persistence:entity-manager-factory>
> Here is the exception that is thrown:
> Caused by: java.lang.IllegalArgumentException: collection type not parameterized
> 	at org.jboss.seam.util.Reflections.getCollectionElementType(Reflections.java:188)
> 	at org.jboss.seam.Component$MapInitialValue.<init>(Component.java:2457)
> 	at org.jboss.seam.Component.getInitialValue(Component.java:526)
> 	at org.jboss.seam.Component.getTopInitialValue(Component.java:510)
> 	at org.jboss.seam.Component.initInitializers(Component.java:488)
> 	at org.jboss.seam.Component.<init>(Component.java:260)
> 	at org.jboss.seam.Component.<init>(Component.java:214)
> 	at org.jboss.seam.init.Initialization.addComponent(Initialization.java:940)
> Unfortunately, the best option we have, from the converters that Seam supports, is to make it a Map<String, String>. In the patch supplied I have used this signature.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list