[jboss-user] [JBoss Seam] - Bug? EL and Anonymous Classes

thatrichard do-not-reply at jboss.com
Wed Jul 18 07:18:55 EDT 2007


I'm using Seam2/JBoss4.2.

I get an exception when using EL to reference a method on an anonymous class.  You can view the relevant code at http://www.jboss.org/index.html?module=bb&op=viewtopic&t=112929

In short:
1. I bind an anonymous class using Contexts.getConversationContext().set("someName", anonymousClass)
2. I call a method on the class using EL during the same conversation.

Is there a technical reason that I cannot do this or is this a bug?

Richard
P.S. 2. Where can I get the source for jboss-el.jar? This lib is distributed with the source for JBoss 4.2 and Seam 2. I can't seem to find it among the JBoss projects.

Exception
javax.faces.FacesException: javax.el.ELException: /forms/party/person/editor.xhtml @42,112 rendered="#{not empty partyFinderClient and partyFinderClient.supportsCancel()}": java.lang.IllegalAccessException: Class org.jboss.el.util.ReflectionUtil can not access a member o
  | f class com.sadalbari.mvanamibia.registration.RegistrationEditorBean$1 with modifiers "public"
  | 	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:880)
  | 	at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
  | 	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
  | 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
  | 	at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
  | 	at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
  | 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
  | 	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 
  | 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  | 
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  | 	at java.lang.Thread.run(Thread.java:619)
  | Caused by: javax.el.ELException: /forms/party/person/editor.xhtml @42,112 rendered="#{not empty partyFinderClient and partyFinderClient.supportsCancel()}": java.lang.IllegalAccessException: Class org.jboss.el.util.ReflectionUtil can not access a member o
  | f class com.sadalbari.mvanamibia.registration.RegistrationEditorBean$1 with modifiers "public"
  | 	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
  | 	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
  | 	... 47 more
  | Caused by: java.lang.IllegalAccessException: Class org.jboss.el.util.ReflectionUtil can not access a
  |  member of class com.sadalbari.mvanamibia.registration.RegistrationEditorBean$1 with modifiers "public"
  | 	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
  | 	at java.lang.reflect.Method.invoke(Method.java:588)
  | 	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
  | 	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:270)
  | 	at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
  | 	at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
  | 	at org.jboss.el.parser.AstAnd.getValue(AstAnd.java:26)
  | 	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
  | 	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  | 	... 48 more
  | 	

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065337#4065337

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065337



More information about the jboss-user mailing list