myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Bashan <guy.bas...@gmail.com>
Subject Inner class bean property
Date Sun, 27 Apr 2008 22:04:13 GMT
Hi,

 

It seems like JSF is having some difficulties reading bean property which is
inner class.

 

This is the exception I get:

javax.faces.FacesException: java.lang.IllegalAccessException: Class
org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider can
not access a member of class
com.todacell.ui.view.bean.campaign.CampaignTargetingBean with modifiers
"private"
        at
org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
lder.java:136)
        at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean
(ManagedBeanResolver.java:196)
        at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedB
eanResolver.java:162)
        at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.access$301(F
acesCompositeELResolver.java:46)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver$4.invoke(Fac
esCompositeELResolver.java:108)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.invoke(Faces
CompositeELResolver.java:148)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
esCompositeELResolver.java:104)
        at
org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverI
mpl.java:61)
        at
org.apache.myfaces.custom.redirectTracker.RedirectTrackerVariableResolver.re
solveVariable(RedirectTrackerVariableResolver.java:41)
        at
org.apache.myfaces.custom.security.SecurityContextVariableResolver.resolveVa
riable(SecurityContextVariableResolver.java:45)
        at
org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(Variable
ResolverToELResolver.java:93)
        at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.access$301(F
acesCompositeELResolver.java:46)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver$4.invoke(Fac
esCompositeELResolver.java:108)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.invoke(Faces
CompositeELResolver.java:148)
        at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
esCompositeELResolver.java:104)
        at
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:86)
        at
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        at
org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueEx
pressionToValueBinding.java:160)
        at
javax.faces.component._ValueBindingToValueExpression$2.invoke(_ValueBindingT
oValueExpression.java:103)
        at
javax.faces.component._ValueBindingToValueExpression.invoke(_ValueBindingToV
alueExpression.java:259)
        at
javax.faces.component._ValueBindingToValueExpression.getValue(_ValueBindingT
oValueExpression.java:99)
        at javax.faces.component.UIData.getValue(UIData.java:978)
        at
org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(Html
DataTableHack.java:437)
        at
org.apache.myfaces.component.html.ext.HtmlDataTable.createDataModel(HtmlData
Table.java:847)
        at
org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDat
aTableHack.java:414)
        at
org.apache.myfaces.component.html.ext.HtmlDataTable.getDataModel(HtmlDataTab
le.java:839)
        at
org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlData
TableHack.java:87)
        at
org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase.enco
deInnerHtml(HtmlTableRendererBase.java:221)
        at
org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase.enco
deChildren(HtmlTableRendererBase.java:134)
        at
org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlT
ableRenderer.java:187)
        at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:59
4)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:239)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:246)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:246)
        at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(Jsp
ViewHandlerImpl.java:424)
        at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:380)
        at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
        at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
com.todacell.ui.view.filter.OpenSessionInViewFilter.doFilterInternal(OpenSes
sionInViewFilter.java:149)
        at
com.todacell.ui.view.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:61)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.
java:147)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:584)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalAccessException: Class
org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider can
not access a member of class
com.todacell.ui.view.bean.campaign.CampaignTargetingBean with modifiers
"private"
        at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
        at java.lang.Class.newInstance0(Class.java:349)
        at java.lang.Class.newInstance(Class.java:308)
        at
org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.newIn
stance(TomcatAnnotationLifecycleProvider.java:45)
        at
org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
lder.java:81)
        ... 60 more

 

this is the property:

  private List<TargetingParam> targetingParams = new
ArrayList<TargetingParam>();

 

Setter and getter:

  public List<TargetingParam> getTargetingParams()

  {

    return targetingParams;

  }

 

  public void setTargetingParams(List<TargetingParam> targetingParams)

  {

    this.targetingParams = targetingParams;

  }

 

Inner class declaration:

  public static class TargetingParam

  {

..

  }

 


Mime
View raw message