myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Gavazuk <antongava...@gmail.com>
Subject Re: java.lang.InstantiationException
Date Tue, 26 Oct 2010 07:44:33 GMT
Hi
first of all its a problem not of deployment,
its problem when you accessing the page javax.faces.FacesException: An
exception occurred processing JSP page
/Todo.jsp at line 21

Second you have not added any details about version of you MyFaces libs and
you env.

Third - check the constructor of class de.vogella.jsf.todo.model.Todo -
there must be one without parameters,
I suspect that it has only constructors with parameters

2010/10/26 El Arbi ABOUSSOROR <el-arbi.aboussoror@sogeti.com>

> Hi,
>
>
>
>  I have a problem when deploying a webapp.
>
> This is the stack trace (thanks for your help):
>
>
>
>
>
> java.lang.InstantiationException: de.vogella.jsf.todo.model.Todo
>
>      at java.lang.Class.newInstance0(Unknown Source)
>
>      at java.lang.Class.newInstance(Unknown Source)
>
>      at
>
> org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.newIn
> stance(TomcatAnnotationLifecycleProvider.java:48)
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
> lder.java:85)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean
> (ManagedBeanResolver.java:198)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedB
> eanResolver.java:164)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at
>
> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverI
> mpl.java:64)
>
>      at
>
> org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(Variable
> ResolverToELResolver.java:95)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
>
>      at
> org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
>
>      at
>
> org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueEx
> pressionToValueBinding.java:161)
>
>      at
>
> org.apache.myfaces.config.impl.digester.elements.ManagedProperty.getRuntimeV
> alue(ManagedProperty.java:130)
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBea
> nBuilder.java:248)
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
> lder.java:92)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean
> (ManagedBeanResolver.java:198)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedB
> eanResolver.java:164)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at
>
> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverI
> mpl.java:64)
>
>      at
>
> org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(Variable
> ResolverToELResolver.java:95)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
>
>      at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
>
>      at
> org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
>
>      at
>
> org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101
> )
>
>      at
>
> org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationIm
> pl.java:307)
>
>      at
>
> javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:94
> )
>
>      at
>
> javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassi
> cTagBase.java:1113)
>
>      at
>
> javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTa
> gBase.java:434)
>
>      at
>
> org.apache.jsp.Todo_jsp._jspx_meth_h_005fcommandLink_005f0(Todo_jsp.java:308
> )
>
>      at
> org.apache.jsp.Todo_jsp._jspx_meth_h_005fform_005f0(Todo_jsp.java:267)
>
>      at
> org.apache.jsp.Todo_jsp._jspx_meth_f_005fview_005f0(Todo_jsp.java:180)
>
>      at org.apache.jsp.Todo_jsp._jspService(Todo_jsp.java:133)
>
>      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>      at
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 77)
>
>      at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
>
>      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
>
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>      at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:290)
>
>      at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:206)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:646)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
> patcher.java:436)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> er.java:374)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> .java:302)
>
>      at
>
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
> etExternalContextImpl.java:341)
>
>      at
>
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandl
> erImpl.java:486)
>
>      at
>
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
> lerImpl.java:337)
>
>      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:182)
>
>      at
> org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:103)
>
>      at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:290)
>
>      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:191)
>
>      at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
> )
>
>      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:298)
>
>      at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
>
>      at
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
> 11Protocol.java:588)
>
>      at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>
>      at java.lang.Thread.run(Unknown Source)
>
> 25 oct. 2010 18:45:00 javax.faces.webapp._ErrorPageWriter handleThrowable
>
> GRAVE: An exception occurred
>
> javax.faces.FacesException: An exception occurred processing JSP page
> /Todo.jsp at line 21
>
>
>
> 18:
>
> 19:   <%-- Possibility to start a new Todo --%>
>
> 20:   <h:form>
>
> 21:         <h:commandLink binding="#{todoController.addCommand}"
> accesskey="n"
>
> 22:               action="#{todoController.addNew}" value="Add new Todo">
>
> 23:         </h:commandLink>
>
> 24:   </h:form>
>
>
>
>
>
> Stacktrace:
>
>      at
>
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
> etExternalContextImpl.java:347)
>
>      at
>
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandl
> erImpl.java:486)
>
>      at
>
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
> lerImpl.java:337)
>
>      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:182)
>
>      at
> org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:103)
>
>      at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:290)
>
>      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:191)
>
>      at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
> )
>
>      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:298)
>
>      at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
>
>      at
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
> 11Protocol.java:588)
>
>      at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>
>      at java.lang.Thread.run(Unknown Source)
>
> Caused by: org.apache.jasper.JasperException: An exception occurred
> processing JSP page /Todo.jsp at line 21
>
>
>
> 18:
>
> 19:   <%-- Possibility to start a new Todo --%>
>
> 20:   <h:form>
>
> 21:         <h:commandLink binding="#{todoController.addCommand}"
> accesskey="n"
>
> 22:               action="#{todoController.addNew}" value="Add new Todo">
>
> 23:         </h:commandLink>
>
> 24:   </h:form>
>
>
>
>
>
> Stacktrace:
>
>      at
>
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra
> pper.java:510)
>
>      at
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:4
> 19)
>
>      at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
>
>      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
>
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>      at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:290)
>
>      at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:206)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:646)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
> patcher.java:436)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> er.java:374)
>
>      at
>
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> .java:302)
>
>      at
>
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
> etExternalContextImpl.java:341)
>
>      ... 18 more
>
> Caused by: javax.faces.FacesException: java.lang.InstantiationException:
> de.vogella.jsf.todo.model.Todo
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
> lder.java:164)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean
> (ManagedBeanResolver.java:198)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedB
> eanResolver.java:164)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at
>
> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverI
> mpl.java:64)
>
>      at
>
> org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(Variable
> ResolverToELResolver.java:95)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
>
>      at
> org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
>
>      at
>
> org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueEx
> pressionToValueBinding.java:161)
>
>      at
>
> org.apache.myfaces.config.impl.digester.elements.ManagedProperty.getRuntimeV
> alue(ManagedProperty.java:130)
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBea
> nBuilder.java:248)
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
> lder.java:92)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean
> (ManagedBeanResolver.java:198)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedB
> eanResolver.java:164)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at
>
> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverI
> mpl.java:64)
>
>      at
>
> org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(Variable
> ResolverToELResolver.java:95)
>
>      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
>
>      at
>
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(Fac
> esCompositeELResolver.java:140)
>
>      at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
>
>      at org.apache.el.parser.AstValue.getValue(AstValue.java:112)
>
>      at
> org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
>
>      at
>
> org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101
> )
>
>      at
>
> org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationIm
> pl.java:307)
>
>      at
>
> javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:94
> )
>
>      at
>
> javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassi
> cTagBase.java:1113)
>
>      at
>
> javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTa
> gBase.java:434)
>
>      at
>
> org.apache.jsp.Todo_jsp._jspx_meth_h_005fcommandLink_005f0(Todo_jsp.java:308
> )
>
>      at
> org.apache.jsp.Todo_jsp._jspx_meth_h_005fform_005f0(Todo_jsp.java:267)
>
>      at
> org.apache.jsp.Todo_jsp._jspx_meth_f_005fview_005f0(Todo_jsp.java:180)
>
>      at org.apache.jsp.Todo_jsp._jspService(Todo_jsp.java:133)
>
>      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>      at
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 77)
>
>      ... 28 more
>
> Caused by: java.lang.InstantiationException: de.vogella.jsf.todo.model.Todo
>
>      at java.lang.Class.newInstance0(Unknown Source)
>
>      at java.lang.Class.newInstance(Unknown Source)
>
>      at
>
> org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.newIn
> stance(TomcatAnnotationLifecycleProvider.java:48)
>
>      at
>
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBui
> lder.java:85)
>
>      ... 65 more
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message