[jboss-jira] [JBoss JIRA] (AS7-3305) java.lang.IllegalAccessError when invoking protected method from another class in the same package path but different jar.
Tomas Gustavsson (JIRA)
jira-events at lists.jboss.org
Thu Mar 8 04:48:36 EST 2012
[ https://issues.jboss.org/browse/AS7-3305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675049#comment-12675049 ]
Tomas Gustavsson commented on AS7-3305:
---------------------------------------
I tried with a jboss-deployment-structure.xml like the following, but no luck:
-----
<jboss-deployment-structure>
<!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<!-- This corresponds to the top level deployment. For a war this is the war's module, for an ear -->
<!-- This is the top level ear module, which contains all the classes in the EAR's lib folder -->
<deployment>
</deployment>
<sub-deployment name="ejbca-ejb.jar">
<resources>
<resource-root path="ejbca-util.jar" >
</resource-root>
</resources>
</sub-deployment>
</jboss-deployment-structure>
> 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