5 Replies Latest reply on May 15, 2008 11:08 PM by Tom Goring

    java.lang.IllegalArgumentException in session context

    Deepa Datar Newbie

      I have a small application in seam which stores data in database


      I have a entity bean Country.java session as CountryComponent.java and JSF as Country.xhtml


      This is the exception thrown


      Caused by java.lang.IllegalArgumentException with message: value of context variable is not an instance of the component bound to the context variable: countryComponent
      
      
      
      Country.java:
      
      -------------
      
      
      @Entity
      
      @Name("country")
      
      @Scope(SESSION)
      
      @Table(name = "country")
      
      public class Country implements java.io.Serializable {
      
      
           private int countryId;
      
           private String countryName;
      
           private String createdBy;
      
      
           public Country() {
      
           }
      
      
           public Country(int countryId, String countryName, String createdBy) {
      
                this.countryId = countryId;
      
                this.countryName = countryName;
      
                this.createdBy = createdBy;
      
           }
      
      
           @Id
      
           @GeneratedValue(strategy=GenerationType.TABLE)
      
           @Column(name = "countryId")
      
           public int getCountryId() {
      
                return this.countryId;
      
           }
      
      
           public void setCountryId(int countryId) {
      
                this.countryId = countryId;
      
           }
      
      
           @Column(name = "countryName")
      
           public String getCountryName() {
      
                return this.countryName;
      
           }
      
      
           public void setCountryName(String countryName) {
      
                this.countryName = countryName;
      
           }
      
      
           @Column(name = "createdBy")
      
           public String getCreatedBy() {
      
                return this.createdBy;
      
           }
      
      
           public void setCreatedBy(String createdBy) {
      
                this.createdBy = createdBy;
      
           }
      
      }
      
      
      
      CountryComponent.java
      
      ---------------------
      
      
      @Stateless
      
      @Name("countryComponent")
      
      public class CountryComponent implements CountryLocal
      
      {
      
           @PersistenceContext
      
           private EntityManager em;
      
           
      
           @In
      
           private Country country;
      
      
           public String doSave() {
      
                country = new Country();
      
                em.persist(country);
      
                return "Success";
      
           }
      
      }
      
      
      
      CountryLocal.java
      
      -----------------
      
      @Local
      
      public interface CountryLocal
      
      {
      
           public String doSave();
      
      }
      
      
      
      Country.xhtml
      
      -------------
      
      <h:form id="countryDetails">
      
           <table>
      
                <tr>
      
                     <td> <font face="tahoma" size="2">Country Name</font> </td>
      
                     <td> <h:inputText value="#{country.countryName}"/> </td>
      
                </tr>
      
                <tr>
      
                     <td> <font face="tahoma" size="2">Created By</font> </td>
      
                     <td> <h:inputText value="#{country.createdBy}"/> </td>
      
                </tr>
      
                <tr>
      
                     <td> <h:commandButton value="Save" action="#{countryComponent.doSave}"/> </td>
      
                </tr>
      
           </table>
      
           </h:form>
      
      
      
      Stacktrace:
      
      -----------
      
      Exception during request processing: 
      
      Caused by javax.servlet.ServletException with message: "value of context variable is not an instance of the component bound to the context variable: countryComponent" 
      
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
      
      org.ajax4jsf.Filter.doFilter(Filter.java:175)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
      
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
      
      org.ajax4jsf.Filter.doFilter(Filter.java:175)
      
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      
      java.lang.Thread.run(Thread.java:595)Caused by java.lang.IllegalArgumentException with message: "value of context variable is not an instance of the component bound to the context variable: countryComponent" 
      
      org.jboss.seam.Component.getInstance(Component.java:1885)
      
      org.jboss.seam.Component.getInstance(Component.java:1840)
      
      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)
      
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
      
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
      
      org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
      
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
      
      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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
      
      org.ajax4jsf.Filter.doFilter(Filter.java:175)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
      
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
      
      org.ajax4jsf.Filter.doFilter(Filter.java:175)
      
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      
      java.lang.Thread.run(Thread.java:595)
      
      



      Can anyone give any inputs?


      Thanks


        • 1. Re: java.lang.IllegalArgumentException in session context
          Deepa Datar Newbie

          Found that I get this exception when I hot deploy the application.


          Without, hot deployment I find get this exception



          java.lang.IllegalArgumentException: Could not invoke method by reflection: CountryLocal.doSave() 



          Stack Trace:


          Exception during request processing: 
          
          Caused by javax.servlet.ServletException with message: "#{countryComponent.doSave}: java.lang.IllegalArgumentException: Could not invoke method by reflection: CountryLocal.doSave() on: $Proxy97" 
          
          javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          
          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
          
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
          
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
          
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          
          java.lang.Thread.run(Thread.java:595)Caused by javax.faces.FacesException with message: "#{countryComponent.doSave}: java.lang.IllegalArgumentException: Could not invoke method by reflection: CountryLocal.doSave() on: $Proxy97" 
          
          com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
          
          javax.faces.component.UICommand.broadcast(UICommand.java:383)
          
          org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
          
          org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
          
          org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
          
          org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
          
          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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          
          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
          
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
          
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
          
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          
          java.lang.Thread.run(Thread.java:595)Caused by javax.faces.el.EvaluationException with message: "java.lang.IllegalArgumentException: Could not invoke method by reflection: CountryLocal.doSave() on: $Proxy97" 
          
          javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
          
          com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
          
          javax.faces.component.UICommand.broadcast(UICommand.java:383)
          
          org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
          
          org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
          
          org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
          
          org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
          
          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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          
          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
          
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
          
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
          
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          
          java.lang.Thread.run(Thread.java:595)Caused by java.lang.IllegalArgumentException with message: "Could not invoke method by reflection: CountryLocal.doSave() on: $Proxy97" 
          
          org.jboss.seam.util.Reflections.invoke(Reflections.java:31)
          
          org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
          
          org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
          
          org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
          
          org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
          
          org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
          
          org.javassist.tmp.java.lang.Object_$$_javassist_2.doSave(Object_$$_javassist_2.java)
          
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          
          java.lang.reflect.Method.invoke(Method.java:585)
          
          org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
          
          org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
          
          org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
          
          org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
          
          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)
          
          org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
          
          org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
          
          org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
          
          org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
          
          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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          
          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
          
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
          
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
          
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          
          java.lang.Thread.run(Thread.java:595)Caused by java.lang.IllegalArgumentException with message: "object is not an instance of declaring class" 
          
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          
          java.lang.reflect.Method.invoke(Method.java:585)
          
          org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
          
          org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
          
          org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
          
          org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
          
          org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
          
          org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
          
          org.javassist.tmp.java.lang.Object_$$_javassist_2.doSave(Object_$$_javassist_2.java)
          
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          
          java.lang.reflect.Method.invoke(Method.java:585)
          
          org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
          
          org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
          
          org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
          
          org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
          
          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)
          
          org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
          
          org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
          
          org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
          
          org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
          
          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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:302)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          
          org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
          
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
          
          org.ajax4jsf.Filter.doFilter(Filter.java:175)
          
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
          
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
          
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
          
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          
          java.lang.Thread.run(Thread.java:595)



          Any suggestions?


          Thanks

          • 2. Re: java.lang.IllegalArgumentException in session context
            Tom Goring Apprentice

            You missing on CountryComponent.java


            @Local(CountryComponentLocal.class)


            ?

            • 3. Re: java.lang.IllegalArgumentException in session context
              Deepa Datar Newbie

              I don't think @Local is required in CountryComponent since it's a Stateful Session, but @Local is present in CountryLocal which is the local interface.

              • 5. Re: java.lang.IllegalArgumentException in session context
                Tom Goring Apprentice

                sorry ... ignore this it's not required (it's just all my SFSB's have it)