0

In my model i have this:

@Entity
public class Plan {
  ...
  @Temporal(TemporalType.TIMESTAMP)
  @Column(nullable = false)
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Calendar creationDate;
  ...

In eclipse debugger, i have a NullPointerException in this line:

plan.setCreationDate(instance);
davioooh
  • 23,742
  • 39
  • 159
  • 250
Sanama Na
  • 143
  • 1
  • 6

1 Answers1

1

Probably your plan object isn't instantiated...

This will prevent the exception:

if (plan != null){
    plan.setCreationDate(instance);
}
davioooh
  • 23,742
  • 39
  • 159
  • 250