3 Replies Latest reply on Jun 16, 2006 1:17 AM by Christian Pietsch

    Configuration of seam sfsb-components via components.xml

    Christian Pietsch Newbie

      Following situation: I'm trying to configure my seam-component implemented as stateful session bean via components.xml. The component itself works as expected but it cannot be configured via components.xml. Exception is:

      17:33:33,671 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: loginAction
      at org.jboss.seam.Component.newInstance(Component.java:704)
      at org.jboss.seam.Component.newInstance(Component.java:1257)
      at org.jboss.seam.Component.getInstance(Component.java:1212)
      at org.jboss.seam.Component.getInstance(Component.java:1195)
      at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
      at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
      at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
      at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
      at com.sun.el.parser.AstValue.getValue(AstValue.java:85)
      at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
      at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
      at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
      at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
      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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
      at org.jboss.seam.Component.initialize(Component.java:755)
      at org.jboss.seam.Component.newInstance(Component.java:700)
      ... 52 more


      Getter/Setters within SFSB are defined, corresponding xml fragment is:
      <component name="loginAction">
       <property name="username">chris</property>
       <property name="password">chris</property>
       </component>


      Is it just a minor glitch within seam or is me?

      Cheers,

      Chris
      PS: seam kicks ass! congrats to all of its developers!