出现以下错误
SEVERE: Servlet.service() for servlet [spring-servlet] in context with path [/sigma] threw exception [Handler processing failed; nested exception is java.lang.NoSuchFieldError: PESSIMISTIC_FORCE_INCREMENT] with root cause
java.lang.NoSuchFieldError: PESSIMISTIC_FORCE_INCREMENT
在线出现错误
FallbackPnr fallbackPnr = entityManager.find(FallbackPnr.class, searchDate, LockModeType.PESSIMISTIC_FORCE_INCREMENT);
从javaee-api-7.0.jar获取LockModeType
FallBackPnr.java
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name= "super_pnr_counter")
public class FallbackPnr {
@Id
@Column(name="id")
private String id;
@Version
@Column(name="version")
private int version;
@Column(name = "updated_on")
private Date updatedOn;
//getters and setters
}