javax.servlet.jsp.el.ELException: Attempt to convert String "${persistenceService}" to type "com.tdsecurities.common.persistence.IPersistenceService", but there is no PropertyEditor for that type

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • This bug happens when trying to inject a Spring bean into a JSF one, like this: <managed-bean> <managed-bean-name>regionList</managed-bean-name> <managed-bean-class> com.tdsecurities.app.view.RegionListBackingBean </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>persistenceService</property-name> <value>${persistenceService}</value> </managed-property> </managed-bean> In DelegatingVariableResolver.resolveVariable(), it first delegates to the original resolver (in my case, it's Apache MyFaces 1.1.3): Object originalResult = getOriginalVariableResolver().resolveVariable(facesContext, name); if (originalResult != null) { return originalResult; } However, since the JSF bean definition being passed to the MyFaces resolver is not a "normal" one, but contains a reference to a Spring bean, the MyFaces resolver throws an exception, claiming it cannot convert a String into the bean's property type: javax.servlet.jsp.el.ELException: Attempt to convert String "${persistenceService}" to type "com.tdsecurities.common.persistence.IPersistenceService", but there is no PropertyEditor for that type at org.apache.commons.el.Logger.logError(Logger.java:481) at org.apache.commons.el.Logger.logError(Logger.java:498) at org.apache.commons.el.Logger.logError(Logger.java:566) at org.apache.commons.el.Coercions.coerceToObject(Coercions.java:769) at org.apache.commons.el.Coercions.coerce(Coercions.java:343) at org.apache.myfaces.shared_impl.util.ClassUtils.convertToType(ClassUtils.java:301) at org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:189) at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:56) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311) ... etc. Now, I'm not sure whether it's a MyFaces problem or not (the exception is legitimate, however, I'm not sure whether the spec allows exceptions in this case or not) - but in any case, wouldn't it be helpful to build some additional safeguards for such a case in DelegatingVariableResolver.resolveVariable() ?
    via by Alex Savitsky,
  • This bug happens when trying to inject a Spring bean into a JSF one, like this: <managed-bean> <managed-bean-name>regionList</managed-bean-name> <managed-bean-class> com.tdsecurities.app.view.RegionListBackingBean </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>persistenceService</property-name> <value>${persistenceService}</value> </managed-property> </managed-bean> In DelegatingVariableResolver.resolveVariable(), it first delegates to the original resolver (in my case, it's Apache MyFaces 1.1.3): Object originalResult = getOriginalVariableResolver().resolveVariable(facesContext, name); if (originalResult != null) { return originalResult; } However, since the JSF bean definition being passed to the MyFaces resolver is not a "normal" one, but contains a reference to a Spring bean, the MyFaces resolver throws an exception, claiming it cannot convert a String into the bean's property type: javax.servlet.jsp.el.ELException: Attempt to convert String "${persistenceService}" to type "com.tdsecurities.common.persistence.IPersistenceService", but there is no PropertyEditor for that type at org.apache.commons.el.Logger.logError(Logger.java:481) at org.apache.commons.el.Logger.logError(Logger.java:498) at org.apache.commons.el.Logger.logError(Logger.java:566) at org.apache.commons.el.Coercions.coerceToObject(Coercions.java:769) at org.apache.commons.el.Coercions.coerce(Coercions.java:343) at org.apache.myfaces.shared_impl.util.ClassUtils.convertToType(ClassUtils.java:301) at org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:189) at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:56) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311) ... etc. Now, I'm not sure whether it's a MyFaces problem or not (the exception is legitimate, however, I'm not sure whether the spec allows exceptions in this case or not) - but in any case, wouldn't it be helpful to build some additional safeguards for such a case in DelegatingVariableResolver.resolveVariable() ?
    via by Alex Savitsky,
  • Bug Reports/Unresolved - JAMWiki Java Wiki Engine
    via by Unknown author,
  • Error from sventon 2.0
    via by EasyTarget,
  • WASv6.0 - JSTLv1.1 problems
    via by Troy Chung,
  • Petstore and ServletException
    via by 843830,
    • javax.servlet.jsp.el.ELException: Attempt to convert String "${persistenceService}" to type "com.tdsecurities.common.persistence.IPersistenceService", but there is no PropertyEditor for that type at org.apache.commons.el.Logger.logError(Logger.java:481) at org.apache.commons.el.Logger.logError(Logger.java:498) at org.apache.commons.el.Logger.logError(Logger.java:566) at org.apache.commons.el.Coercions.coerceToObject(Coercions.java:769) at org.apache.commons.el.Coercions.coerce(Coercions.java:343) at org.apache.myfaces.shared_impl.util.ClassUtils.convertToType(ClassUtils.java:301) at org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:189) at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:56) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311)
    No Bugmate found.