Lombok: RequiredArgsConstructor is not working
<p>It seems that <code>@RequiredArgsConstructor</code> not working in the code below. Why is it?</p>

<pre><code>import java.io.Serializable;

import lombok.Data;
import lombok.RequiredArgsConstructor;

@Data
@RequiredArgsConstructor
public class User implements Serializable {

    private String username;

    /*public User(String username) {
        this.username = username;
    }*/

    private static final long serialVersionUID = 8043545738660721361L;
}
</code></pre>

<p>I get the error:</p>

<pre><code>javax.faces.el.EvaluationException: java.lang.Error: Unresolved compilation problem: 
    The constructor User(String) is undefined
</code></pre>

<p>For some reason seems it does work for other domain class in which no constructor defined but instead used the <code>@RequiredArgsConstructor</code> annotation.</p>