java.lang.IllegalStateException: Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class ExtendedRevision with modifiers "private"

Spring JIRA | Andrei Ivanov | 2 years ago
  1. 0

    Trying to use a custom Envers revision class: {code} @Entity @RevisionEntity(ExtendedRevisionListener.class) @Table(name = "revinfo") public class ExtendedRevision implements Serializable { @Id @GeneratedValue @Column(name = "REV") @RevisionNumber private Integer id; @RevisionTimestamp @Temporal(TemporalType.TIMESTAMP) @Column(name = "REVTSTMP", nullable = false) private Date date; @Column(nullable = false, length = 15) private String username; public Integer getId() { return id; } public Date getDate() { return date; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } {code} triggers this error: {noformat} java.lang.IllegalStateException: Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class ExtendedRevision with modifiers "private" at org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:262) at org.springframework.util.ReflectionUtils.getField(ReflectionUtils.java:132) at org.springframework.data.util.AnnotationDetectionFieldCallback.getValue(AnnotationDetectionFieldCallback.java:82) at org.springframework.data.history.AnnotationRevisionMetadata.<init>(AnnotationRevisionMetadata.java:54) {noformat} I assume the fields have to be made accessible from the field callback.

    Spring JIRA | 2 years ago | Andrei Ivanov
    java.lang.IllegalStateException: Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class ExtendedRevision with modifiers "private"
  2. 0

    Trying to use a custom Envers revision class: {code} @Entity @RevisionEntity(ExtendedRevisionListener.class) @Table(name = "revinfo") public class ExtendedRevision implements Serializable { @Id @GeneratedValue @Column(name = "REV") @RevisionNumber private Integer id; @RevisionTimestamp @Temporal(TemporalType.TIMESTAMP) @Column(name = "REVTSTMP", nullable = false) private Date date; @Column(nullable = false, length = 15) private String username; public Integer getId() { return id; } public Date getDate() { return date; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } {code} triggers this error: {noformat} java.lang.IllegalStateException: Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class ExtendedRevision with modifiers "private" at org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:262) at org.springframework.util.ReflectionUtils.getField(ReflectionUtils.java:132) at org.springframework.data.util.AnnotationDetectionFieldCallback.getValue(AnnotationDetectionFieldCallback.java:82) at org.springframework.data.history.AnnotationRevisionMetadata.<init>(AnnotationRevisionMetadata.java:54) {noformat} I assume the fields have to be made accessible from the field callback.

    Spring JIRA | 2 years ago | Andrei Ivanov
    java.lang.IllegalStateException: Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class ExtendedRevision with modifiers "private"
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Bug 229191 – Cannot start NetBeans on JDK8 because ISE occurs

    netbeans.org | 2 weeks ago
    java.lang.IllegalStateException: java.lang.IllegalAccessException: Class org.openide.util.WeakListenerImpl$ProxyListener can not access a member of class org.openide.filesystems.$Proxy0 with modifiers "public"

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class ExtendedRevision with modifiers "private"

      at org.springframework.util.ReflectionUtils.handleReflectionException()
    2. Spring Core
      ReflectionUtils.getField
      1. org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:262)
      2. org.springframework.util.ReflectionUtils.getField(ReflectionUtils.java:132)
      2 frames
    3. Spring Data Core
      AnnotationRevisionMetadata.<init>
      1. org.springframework.data.util.AnnotationDetectionFieldCallback.getValue(AnnotationDetectionFieldCallback.java:82)
      2. org.springframework.data.history.AnnotationRevisionMetadata.<init>(AnnotationRevisionMetadata.java:54)
      2 frames