[jboss-jira] [JBoss JIRA] (AS7-3305) java.lang.IllegalAccessError when invoking protected method from another class in the same package path but different jar.

Rodney Kite (JIRA) jira-events at lists.jboss.org
Mon Jan 16 17:38:18 EST 2012


    [ https://issues.jboss.org/browse/AS7-3305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659699#comment-12659699 ] 

Rodney Kite commented on AS7-3305:
----------------------------------

  A jar manifested in by another jar should have full access to its classes by the Java spec.  The jars should be in the same classpath.  This works in JBoss versions JBoss 4.2.x, 5.x, 6.x.  I no longer have access to a protected function which worked fine before.  This is a run time bug it deploys fine.  


                
> java.lang.IllegalAccessError when invoking protected method from another class in the same package path but different jar.
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-3305
>                 URL: https://issues.jboss.org/browse/AS7-3305
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Class Loading
>    Affects Versions: 7.1.0.CR1b
>         Environment: Windows 7 64 bit, Sun JDK 1.6.0_30 32bit
>            Reporter: Rodney Kite
>            Assignee: Stuart Douglas
>
> 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.    

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list