Uploaded image for project: 'Click'
  1. Click
  2. CLK-792

Create an entry on FAQ about reflection exceptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0-RC1
    • documentation
    • None

    Description

      For intermediate java programmer is common to do this trivial error:
      class com.xxxxxxxxClass {
      }

      instead of

      public class com.xxxxxxxxClass {
      }

      Causing this type of execption:
      Caused by: java.lang.IllegalAccessException: Class org.apache.click.util.PropertyUtils can not access a member of class com.xxxxxxxClass with modifiers "public"
      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)

      So, I'm suggesting the following entry on FAQ:

      question: can not access a member of with modifiers "public"
      answer:
      If you get the following error in Click:
      java.lang.IllegalAccessException: Class org.apache.click.util.PropertyUtils can not access a member of class com.xxxxxClass with modifiers "public"
      it's likely because your class com.xxxxxxxxClass is not public. You just need to add a public keyword in front of the class definition

      public class com.xxxxxxxxAction {
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            gilbertoca Gilberto C Andrade
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: