Announcement Announcement Module
Collapse
No announcement yet.
java.lang.SecurityException: Can not make a java.lang.Class constructor accessible Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.SecurityException: Can not make a java.lang.Class constructor accessible

    Hi,

    I am trying to save an object using Spring Datastore using MongoDB.
    My object is having an attribute private Class className;
    To support this i added <constructor-arg name="mongoConverter" ref="mappingConverter"/>
    in the xml file.

    But still i am getting the below exception:
    java.lang.SecurityException: Can not make a java.lang.Class constructor accessible
    java.lang.reflect.AccessibleObject.setAccessible0( AccessibleObject.java:118)
    java.lang.reflect.AccessibleObject.setAccessible(A ccessibleObject.java:108)
    org.springframework.util.ReflectionUtils.makeAcces sible(ReflectionUtils.java:416)

    Could any one help on what is the problem?

  • #2
    I have got the same problem with mongodb and when i am using method findById

    Comment

    Working...
    X