17 December 2008

How to solve Could not create Component: org.jboss.seam.ui.EntityConverter

If you have migrated to 2.1.x or above and getting the above Exception whose root cause is as below, please read on.
Caused by: java.lang.IllegalArgumentException: no such field: org.jboss.seam.ui.EntityConverter.entityManager

Solution:
If you have something similar to the following in your component.xml
    <component name="org.jboss.seam.ui.EntityConverter">
        <property name="entityManager">#{em}</property>
    </component>
please change it to
<ui:jpa-entity-loader entity-manager="#{em}" />

Dont forget to add xmlns:ui="http://jboss.com/products/seam/ui" on the top of the file to components