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;
}
}
hello Gurinder,
try registering the converters in your faces-config.
regards.