Derek Shen's Article - Does JSF still have problems with startup methods?
Hi,
I've been following this article as the base to learn JSF and the integration between Hibernate and Spring. The author mentioned about the workaround to startup methods in the JSF using init() (or whatever), and IoC, since JSF doesn't support this startup feature.
The article is from 2004, is there any enhancement or better approach on that? BTW, are the techniques used in this article a good path for who is still learning the whole architecture?
http://www.javaworld.com/javaforums/showflat.php?Cat=0&Number=10690&an=0&page=0#Post10690
I already took a look in the Appfuse, which is much better. However, this article is really good as well to get started on those technologies and architecture.
Regards.
There you go. I hope it can give you a clue:
Thanks. Regards.
07:01:32,029 ERROR ApplicationImpl:870 - Can't set managed bean property: 'initialized'.
javax.faces.FacesException: Can't set managed bean property: 'initialized'.
at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:510)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:162)
at com.sun.faces.application.ApplicationImpl.createAndMaybeStoreManagedBeans(ApplicationImpl.java:863)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:79)
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:120)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:238)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:155)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:136)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:123)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:266)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:380)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at mypackage.Filter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:492)
... 33 more
Caused by: javax.faces.FacesException: Could not initialize XXXListBean
at mypackage.XXXListBean.setInitialized(Unknown Source)
... 39 more
Caused by: java.lang.NullPointerException
... 40 more