Extending emailTemplate in Multitenant addon

I am trying to extend email template to ExtEmaiTemplate but getting the following error:


Here is the generated code of the entity:

mport javax.persistence.Entity;

import javax.persistence.DiscriminatorValue;
import com.haulmont.cuba.core.entity.annotation.Extends;
import javax.persistence.Column;
import com.haulmont.addon.emailtemplates.entity.EmailTemplate;

@Entity(name = "erp$ExtEmailTemplate")
public class ExtEmailTemplate extends EmailTemplate {
    private static final long serialVersionUID = -3937357577346702173L;

    @Column(name = "TENANT_ID")
    protected String tenantId;

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;

    public String getTenantId() {
        return tenantId;

Thanks for any help.

Hi @mortozakhan,

See, this is a basic Java thing - nothing related to CUBA or the Add-on. EmailTempalte has an abstract method getReport(), that you need to define in your implementation.


Hi @mortozakhan,

There are two implementations for email template classes, you need to create extensions for JsonEmailTemplate and ReportEmailTemplate classes which extends basic EmailTemplate class.

Thank you @evgeny.zaharchenko
Thanks for your help, I was trying to extend “EmailTemplate” but I should have tried either of two others as you have mentioned.