Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3305

java.lang.IllegalAccessError when invoking protected method from another class in the same package path but different jar.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.0.CR1b
    • Class Loading
    • None
    • Hide

      Have a Session bean call a protected method in a class that is in the same package path but in a different jar file from the ejb jar. The EJB jar and utility jar are in the same ear file.

      Show
      Have a Session bean call a protected method in a class that is in the same package path but in a different jar file from the ejb jar. The EJB jar and utility jar are in the same ear file.
    • Hide

      Change methods to public fixes the issue.

      Show
      Change methods to public fixes the issue.

    Description

      tried to access method com.tis.utilities.AbstractJavaBeanSelectionPagination.selectObject(IZ)V from class com.tis.utilities.GenericPaginationBean

      I have an EJB jar which uses a MANIFEST.MF CLASS-PATH: entry to include a jar with some utility code. The two jars are packaged in the same ear file. Compiles and deploys fine. For some reason the EJB jar's classes can not invoke protected methods in classes that are in the same package path but in different jars. Invocation of public methods works fine. By the Java spec protected methods should be friends and thus accessible from other classes in the same package path.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            rkite01 Rodney Kite (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: