Skip to content

Compilation error "The constructor Author(long, String, String) is undefined" #15

@clunny-slb

Description

@clunny-slb

I cloned the repo yesterday (11 July 2019) and I am facing compilation errors.

[ERROR] getAllBooks(com.github.berkleytechnologyservices.restdocs.example.book.BookRestControllerDocumentationTest)  Time elapsed: 0.001 s  <<< ERROR!
java.lang.Error: 
Unresolved compilation problems: 
        The constructor Author(long, String, String) is undefined
        The constructor Author(long, String, String) is undefined
        The method asList(T...) in the type Arrays is not applicable for the arguments (Book, Book, Book, Book, Book, Book)
        The constructor Book(long, String, int, Author) is undefined
        The constructor Book(long, String, int, Author) is undefined
        The constructor Book(long, String, int, Author) is undefined
        The constructor Book(long, String, int, Author) is undefined
        The constructor Book(long, String, int, Author) is undefined
        The constructor Book(long, String, int, Author) is undefined

        at com.github.berkleytechnologyservices.restdocs.example.book.BookRestControllerDocumentationTest.getAllBooks(BookRestControllerDocumentationTest.java:50)

It looks like they are related to changes in the lombok version causing the constructors for Author and Book to not get generated. See this github issue projectlombok/lombok#1563.

I've tried some the suggestions in the linked github issue (such as including the lombok.config file and specifying the old lombok version in the pom.xml (version 1.16.18)) but none of them resolve the issue. What is the best solution for this?

I'm running Oracle JDK 8 on a Mac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions