Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-489

java.lang.IllegalAccessException thrown org.jboss.resteasy.core.ConstructorInjectorImpl on creating WS with a non-public constructor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.1.0.GA
    • None
    • None
    • Hide

      Change the constructor sequence in your WS that the public construct appears first.

      Show
      Change the constructor sequence in your WS that the public construct appears first.

      If a non-public constructor of my restful service is the "first" constructor in the source code e.g.:
      @Path("/myservices")
      public class Services {

      Services() {
      }

      public Services(@Context javax.servlet.ServletContext context, @Context HttpServletRequest request)

      { ...... }

      the exception is thrown:
      Caused by: java.lang.IllegalAccessException: Class org.jboss.resteasy.core.ConstructorInjectorImpl can not access a member of class com.axatech.eplatform.configserver.Organizations with modifiers ""
      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:505)
      at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:82)
      ... 40 more

              patriot1burke@gmail.com Bill Burke (Inactive)
              dimonv_jira Dmitri Voronov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: