0

Error:Internal compiler error: java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.MethodBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.FieldBinding at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:840)

I have just installed lombok version 1.18.8 in my STS 4.3.2 and I have read that it is a bug of lombok due to which above error is arising (link:Internal compiler error: Classcast exception). So help me out in downgrading the version of lombok or to remove it so that I can install older version that is compatible with STS 4.3.2 (suggestions from internet is lombok 1.16.18).

package in.ab.abc.push.fcm.apns;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;

@Data
@JsonInclude(value = Include.NON_NULL)
public class ABC{
    private String category;
    @JsonProperty("content-available")
    private int contentAvailable;
    @JsonProperty("badge")
    private int badge;
    @JsonProperty("sound")
    private String sound;
    private ABCD alert;
}
ricky
  • 1
  • 3
  • You could try the latest edge release available at https://projectlombok.org/download-edge. The changelog lists one bugfix that sounds exactly like your issue. – Jan Rieke Aug 29 '19 at 20:03
  • @JanRieke It worked but for that I followed some steps like removing the code and then running the application and then pasting the code again since initially error persisted like before. – ricky Aug 30 '19 at 05:51
  • A full "clean" should also do the trick. – Jan Rieke Aug 30 '19 at 06:39

0 Answers0