3 Replies Latest reply on Jan 18, 2008 4:06 AM by Nicklas Karlsson

    Could not instantiate Seam component

    AJAY KUMAR UPPALAPATI Newbie

      hello friends,

      Why this error will occur? Can any one tell me proper reason..

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: WDActionWService
       org.jboss.seam.Component.newInstance(Component.java:1962)
       org.jboss.seam.Component.getInstance(Component.java:1865)
       org.jboss.seam.Component.getInstance(Component.java:1832)
       org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
       org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
       org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
       org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
       javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
       org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
       org.jboss.el.parser.AstValue.getTarget(AstValue.java:34)
       org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
       org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
       com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
       com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
       javax.faces.component.UICommand.broadcast(UICommand.java:383)
       javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
       javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
       com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      
      root cause
      
      java.lang.NullPointerException
       org.jboss.seam.example.withdrawal.WithDrawalActionWService.<init>(WithDrawalActionWService.java:32)
       sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java
      
      
      



      thx in advance,
      Han

        • 1. Re: Could not instantiate Seam component
          Pete Muir Master

          Please post the whole stack trace from the server log

          • 2. Re: Could not instantiate Seam component
            Marc Lustig Newbie

            I get the same exception. I suppose it has a root cause, which is a cycle in page-redirection. But I wonder why the root-cause is not logged.
            As you can draw from the stacktrace, we are using Icefaces (1.6.1).
            Btw., the ApplicationUser-class is not the problem.

            2008-01-18 09:51:02,984 ERROR [com.icesoft.faces.facelets.D2DFaceletViewHandler] Problem in renderResponse: Could not instantiate Seam component: applicationUser
            org.jboss.seam.InstantiationException: Could not instantiate Seam component: applicationUser
             at org.jboss.seam.Component.newInstance(Component.java:1962)
             at org.jboss.seam.Component.getInstance(Component.java:1865)
             at org.jboss.seam.Component.getInstance(Component.java:1832)
             at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
             at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
             at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
             at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
             at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
             at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
             at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
             at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
             at org.jboss.el.parser.AstDeferredExpression.getValue(AstDeferredExpression.java:26)
             at org.jboss.el.parser.AstCompositeExpression.getValue(AstCompositeExpression.java:31)
             at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
             at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
             at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicInputRenderer.getValue(DomBasicInputRenderer.java:60)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.getValue(DomBasicRenderer.java:153)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeEnd(DomBasicRenderer.java:125)
             at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:361)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:357)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:357)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:357)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:357)
             at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
             at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
             at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:351)
             at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
             at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
             at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:585)
             at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
             at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
             at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
             at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:322)
             at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
             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 com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:26)
             at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147)
             at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
             at com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:31)
             at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:46)
             at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
             at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
             at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
             at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
             at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:110)
             at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
             at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
             at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
             at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:97)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at de.swm.kundenportal.web.NtlmAuthenticationFilter.doFilter(NtlmAuthenticationFilter.java:37)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
             at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
             at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
             at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
             at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
             at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
             at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
             at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
             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:157)
             at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
             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:595)
            Caused by: java.lang.InstantiationException: de.swm.kundenportal.model.ApplicationUser
             at java.lang.Class.newInstance0(Class.java:335)
             at java.lang.Class.newInstance(Class.java:303)
             at org.jboss.seam.Component.instantiateJavaBean(Component.java:1304)
             at org.jboss.seam.Component.instantiate(Component.java:1260)
             at org.jboss.seam.Component.newInstance(Component.java:1958)
             ... 90 more
            2008-01-18 09:51:03,531 ERROR [org.jboss.seam.web.ExceptionFilter] handling uncaught exception
            javax.faces.FacesException: Problem in renderResponse: Could not instantiate Seam component: applicationUser
             at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:329)
            ............
            the same stacktrace is repeating numerous times

            • 3. Re: Could not instantiate Seam component
              Nicklas Karlsson Master

              And you have a no-args constructor on ApplicationUser?