14 Replies Latest reply on Feb 25, 2006 11:29 AM by David Geary

    Cannot Instantiate seam component O_o !!

    Carolina U. Newbie

      I was working on a project with jboss-4.0.3SP1 and a old version of seam (3 month ago) the project has some query stuff nicely working with datamodel and facelets, the thing is that we updated to jboss-4.0.4RC1 the last seam version 1.0 beta 2 , to try it.

      The problem now is that the action buttons of my pages cannot call the actions methods linked to them. So I made into the proyect a simple class with a simple xhtml page in order to find the trouble.

      They go like this:

      The Page:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      TEST


      <h:form>

      <h:commandButton class="button" id="testButton"
      value="Test" action="#{test.test}" />

      </h:form>





      My stateless bean

      package py.com.caro.seam;
      
      import javax.ejb.Interceptors;
      import javax.ejb.Stateless;
      
      import org.jboss.seam.annotations.*;
      import org.jboss.seam.ejb.SeamInterceptor;
      
      /**
       * @author carolina
       *
       */
      @Stateless
      @Name("test")
      @Interceptors(SeamInterceptor.class)
      public class TestAction implements Test
       {
      
      
       public String test()
       {
       return "success";
       }
       }
      
      



      And its interface

      
      package py.com.caro.seam;
      
      import javax.ejb.Local;
      
      @Local
      public interface Test
       {
      
       public String test();
      
       }
      



      And as in all the others pages, I get this error when I try to execute that action button:


      ERROR [SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException: Error calling action method of component with id _id0:test
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
      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:44)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      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:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      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(Thread.java:595)


      14:58:30,625 INFO [SeamExceptionFilter] killing transaction


      14:58:30,625 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.FacesException: Error calling action method of component with id _id0:test
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:79)
      at javax.faces.component.UICommand.broadcast(UICommand.java:106)
      at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
      at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
      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:44)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      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:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      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(Thread.java:595)

      Caused by: java.lang.IllegalArgumentException: value found for In attribute has the wrong type: test
      at org.jboss.seam.Component.getInstance(Component.java:1054)
      at org.jboss.seam.Component.getInstance(Component.java:1027)
      at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:43)
      at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
      at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:41)
      at com.sun.el.parser.AstValue.getTarget(AstValue.java:41)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:126)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
      ... 31 more


      I know should be a line of configuration somewhere but I used the dvdstore example as guide for the web.xml, faces-config.xml... If someone could help me I will be grateful.

      Greets;

      Carolina