Skip to content

incompatible return type issue #35

@kennethhyk

Description

@kennethhyk

I am working on a grails 3 (version 3.2.3) project where it needs to convert a gsp into a pdf. I tried to use the rendering plugin provided by grails. I imported the plugin using:
compile 'org.grails.plugins:rendering:2.0.3'
in my build.gradle file
and in my controller i used:
ByteArrayOutputStream bytes = pdfRenderingService.render(template: "/templates/pdf_PI", model: [proformaInvoice: proformaInvoice])
to render the pdf. The service is injected using def pdfRenderingService

however i m getting this error

grails-app/controllers/chsam/re/ProformaInvoiceController.groovy: -1: The return type of java.lang.Object getPdfRenderingService() in chsam.re.ProformaInvoiceController is incompatible with grails.plugins.rendering.pdf.PdfRenderingService in grails.plugins.rendering.RenderingTrait. At [-1:-1] @ line -1, column -1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions