java.lang.IllegalStateException: Could not access method: Class org.springframework.util.ReflectionUtils can not access a member of class com.example.MyEventHandler with modifiers "public"

Spring JIRA | Chris Beams | 1 year ago
  1. 0

    The Network Adapter could not establish the connection - Spring Forum

    spring.io | 5 months ago
    java.lang.IllegalStateException: Unexpected exception thrown by method - java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionDSRA0010E: SQL State = null, Error Code = 17,002
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 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"
  4. 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"

    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 com.example.MyEventHandler with modifiers "public"

      at org.springframework.util.ReflectionUtils.handleReflectionException()
    2. Spring Core
      ReflectionUtils.invokeMethod
      1. org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:271)
      2. org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:214)
      2 frames
    3. Spring Data REST - Core
      AnnotatedEventHandlerInvoker.onApplicationEvent
      1. org.springframework.data.rest.core.event.AnnotatedEventHandlerInvoker.onApplicationEvent(AnnotatedEventHandlerInvoker.java:92)
      1 frame