Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Not compatible with lombok

Open
#250 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
devtools

Research direction

The reported example is in guide-for-java-devs.pdf and spans Wiki.java, WikiDbService.java, and WikiDbServiceImpl.java. Reproduce the compilation failure with Lombok's @AllArgsConstructor, then trace the Java code-generation path involved. Done means the example compiles with the generated two-argument constructor, with a regression test if the repository has a suitable location.

Written by the indexing model from the issue text.

Description

This is a code example in the book (guide-for-java-devs.pdf), and I made a piece of changes.

  1. Wiki.java corresponds with the database table:
@AllArgsConstructor
public class Wiki {
    public Long id;
    public String name;
}
  1. WikiDbService.java
@ProxyGen
public interface WikiDbService {

    @Fluent
    WikiDbService fetchAll(Handler<AsyncResult<JsonArray>> resultHandler);

    @GenIgnore
    static WikiDbService create(JDBCClient dbClient, Handler<AsyncResult<WikiDbService>> readyHandler) {
        return new WikiDbServiceImpl(dbClient, readyHandler);
    }

    @GenIgnore
    static WikiDbService createProxy(Vertx vertx, String address) {
        return new WikiDbServiceVertxEBProxy(vertx, address);
    }
}


  1. WikiDbServiceImpl.java
    @Override
    public WikiDbService fetchAll(Handler<AsyncResult<JsonArray>> resultHandler) {
        dbClient.query(FETCH_ALL_SQL, queryAr -> {
            if (queryAr.failed()) {
                resultHandler.handle(Future.failedFuture(queryAr.cause()));
                return;
            }

            ResultSet resultSet = queryAr.result();
            List<Wiki> wikiList = resultSet.getResults().stream()
                .map(r -> new Wiki(r.getLong(0), r.getString(1)))
                .collect(Collectors.toList());

            resultHandler.handle(Future.succeededFuture(new JsonArray(new Gson().toJson(wikiList))));
        });

        return this;
    }


Finally, I got a compilation error:

image

it means that there no suitable constructor for Wiki class with 2 arguments ....

But If I generate the constructor:

public class Wiki {
    public Long id;
    public String name;

    public Wiki(Long id, String name) {
        this.id = id;
        this.name = name;
    }
}

It works.

So I think it's not compatible with lombok ...

Dominant language
Java
Stars
111
Forks
88
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-vertx/vertx-codegen

All issues in eclipse-vertx/vertx-codegen

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.