commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trieu, Danny" <>
Subject RE: Posible bug with commons EL.....
Date Wed, 12 Oct 2005 16:13:49 GMT

Thanks for your response. But I don't think I did make the case clear
enough. So, let me give it another try.

My beans are in package

abstract class Foo { // Notice: this class has the default package access
	private String firstName ;
	private String lastName ;
...... Public Getters/Setters ....

Now child class in the same package

public class Bar extends Foo { // Notice: this class has "public" access
	private String abc ;
...... Public Getter/Setter ....

Out side of package, I have no problem creating Bar and at
The same time accessing Foo's, Bar's parent, properties.

For Example:

Public class BarActionForm extends ActionForm {
	Private Bar bar ;
...... Public Getter/Setter .....

public class BarAction extends Action {
	public ActionForward execute( ...., ActionForm form, .... ) {
		Final BarActionForm barForm = (BarActionForm) form ;
		barForm.getBar().setFirstName( "myFirstName" ) ; // no
		// accessing Bar's parent properties.
		return mapping.findForward("success") ;

You see, I have no problem access Foo's properties from a Bar instance
inside my BarActionForm instance.

However, the problem is inside my JSP, where I have the BarActionForm binded
To an action mapping of my html's form tag. Accessing Foo's properties with
EL will result with IllegalAccessException. You see, this is clearly a bug
in commons-el.

For example in my JSP:

<html:form action="/myActionMappingPath" > <!-- this mapping has "myForm",
BarActionForm, bind to it -->
  <html:text property="bar.firstName" /> <!-- this is where I had the
IllegalAccessException -->

I hope this would make it clear that this is a bug. I've search the commons
archive and nothing that I found related to this issue. 

Thanks for any help,


-----Original Message-----
From: James Carman [] 
Sent: Tuesday, October 11, 2005 3:13 PM
To: 'Jakarta Commons Developers List'
Subject: RE: Posible bug with commons EL.....

Check the Java Language Specification:

-----Original Message-----
From: Trieu, Danny [] 
Sent: Tuesday, October 11, 2005 4:52 PM
Subject: Posible bug with commons EL.....



I am accessing a nested bean property via EL and getting a


java.lang.IllegalAccessException: Class org.apache.commons.el.ArraySuffix
can not access a member of class with
modifiers "public"

        at sun.reflect.Reflection.ensureMemberAccess(

        at java.lang.reflect.Method.invoke(

        at org.apache.commons.el.ArraySuffix.evaluate(








my bean has the default package access modifier, but its properties are
declared "public". I think this is bug with the commons.el package. 

Can someone verify if this is true? If it is a bug. Can someone tell when is
the next release that will have a fix for this bug?


Thanks for any help,




"The essence of knowledge is, having it, to apply it; not having it, to
confess your ignorance." -Confucius


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message