ClassNotFoundException when using DynamicQueryFactoryUtil.forClass


  • When trying to using Dynamic Queries there can be ClassNotFoundException errors if the DynamicQuery is obtained using the method DynamicQueryFactoryUtil.forClass.


  • Liferay DXP 7.0+


  • To avoid this type of exceptions, consider using the available method in the API: {className}LocalServiceUtil.dynamicQuery().
  • For example:
    • instead of using DynamicQueryFactoryUtil.forClass(DDLRecord.class),
    • try using DDLRecordLocalServiceUtil.dynamicQuery().
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0