1 Reply Latest reply on Jan 13, 2012 3:39 AM by iabughosh

    Richfaces 4, JSF 2 packaging question - converter not registering

    randhawag

      We are encountering a  [JSF 1006: Cannot instantiate converter of type xxxx] error. We have a packaging structure of

       

      Old package scheme (working)

      vui-sales.ear

          |___vui-sales.war

                     |___WEB-INF/classes/...

       

       

      New package scheme (not working)

      vui-sales.ear

           |___vui-sales.war

                     |___WEB-INF/lib/vui-common.jar

       

      We used to package converters in WEB-INF/classes folder and all @ManagedBean and @FacesConverter classes are scanned, we are trying a different packaging scheme for re-usability by packaging these converters and other JSF components in a jar file as above, however they are not scanned by web container and instantiated when upon container startup or when first invoked? Seems like they don't get registered? Please advise if this is a bug or packaging constraints

       

      Note, if i don't package them inside JAR and inside WEB-INF/classes works fine.

       

       

      Example converter:

       

      @FacesConverter(value = "phoneTypeConverter")

      @ManagedBean

      public class PhoneTypeConverter extends AbstractEnumConverter {

          @Override

          protected Class<? extends Enum> getEnumType() {

              return PhoneType.class;

          }

      }