0 Replies Latest reply on May 14, 2009 7:01 PM by Eldad Moneta

    Could not instantiate Seam component: bidList

    Eldad Moneta Newbie
      I'm having problem creating my first seam project.
      I created 2 basic tables in my mySQL db to test it:user,bid
      I managed to see the seam generated homepage, but when I click the bid list or the user list I receive the following error:

      An Error Occurred:
      Could not instantiate Seam component: bidList
      +- Stack Trace

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: bidList
              at org.jboss.seam.Component.newInstance(Component.java:2106)
              at org.jboss.seam.Component.getInstance(Component.java:1988)
              at org.jboss.seam.Component.getInstance(Component.java:1950)
              at org.jboss.seam.Component.getInstance(Component.java:1944)
              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:54)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
              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.AstEmpty.getValue(AstEmpty.java:29)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
              at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              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.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              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:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              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.HotDeployFilter.doFilter(HotDeployFilter.java:53)
              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:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:/anygeeEntityManagerFactory
              at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:245)
              at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:78)
              at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107)
              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:22)
              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
              at org.jboss.seam.Component.callComponentMethod(Component.java:2211)
              at org.jboss.seam.Component.unwrap(Component.java:2237)
              at org.jboss.seam.Component.getInstance(Component.java:2004)
              at org.jboss.seam.Component.getInstance(Component.java:1950)
              at org.jboss.seam.Component.getInstance(Component.java:1944)
              at org.jboss.seam.Component.getInstance(Component.java:1939)
              at org.jboss.seam.framework.Controller.getComponentInstance(Controller.java:272)
              at org.jboss.seam.framework.PersistenceController.getPersistenceContext(PersistenceController.java:20)
              at org.jboss.seam.framework.EntityQuery.getEntityManager(EntityQuery.java:153)
              at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:37)
              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:22)
              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
              at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:95)
              at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
              at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:89)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
              at com.mydomain.anygee.BidList_$$_javassist_1.validate(BidList_$$_javassist_1.java)
              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:22)
              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
              at org.jboss.seam.Component.callComponentMethod(Component.java:2211)
              at org.jboss.seam.Component.callCreateMethod(Component.java:2134)
              at org.jboss.seam.Component.newInstance(Component.java:2094)
              ... 73 more
      Caused by: javax.naming.NameNotFoundException: anygeeEntityManagerFactory not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
              at javax.naming.InitialContext.lookup(Unknown Source)
              at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:241)
              ... 119 more

      +- Component Tree

      <AjaxViewRoot id="_viewRoot" immediate="false" locale="en" renderKitId="HTML_BASIC" renderRegionOnly="false" rendered="true" selfRendered="false" submitted="false" transient="false" viewId="/BidList.xhtml">

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

          <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>anygee</title> <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>

          <HtmlLoadStyle id="j_id2" rendered="true" src="resource:///stylesheet/theme.xcss" transient="false"/>

          <HtmlLoadStyle id="j_id3" rendered="true" src="/stylesheet/theme.css" transient="false"/>

          </head> <body>

          <HtmlToolBar id="j_id5" itemSeparator="none" rendered="true" transient="false" width="100%">

              <HtmlToolBarGroup id="j_id6" itemSeparator="none" location="left" rendered="true" transient="false">

                  <HtmlOutputText escape="true" id="j_id7" rendered="true" transient="false" value="anygee:"/>

                  <HtmlLink action=" disabled="false" id="j_id8" immediate="false" includePageParams="true" propagation="none" rendered="true" transient="false" value="Home" view="/home.xhtml"/>

              </HtmlToolBarGroup>

              <HtmlLink action=" disabled="false" id="j_id9" immediate="false" includePageParams="false" propagation="none" rendered="true" transient="false" value="Bid List" view="/BidList.xhtml"/>

              <HtmlLink action=" disabled="false" id="j_id10" immediate="false" includePageParams="false" propagation="none" rendered="true" transient="false" value="User List" view="/UserList.xhtml"/>

              <!-- @newMenuItem@ -->

              <HtmlToolBarGroup id="j_id12" itemSeparator="none" location="right" rendered="true" transient="false">

                  <HtmlLink action=" disabled="false" id="j_id14" immediate="false" includePageParams="true" propagation="none" rendered="true" transient="false" value="Login" view="/login.xhtml"/>

              </HtmlToolBarGroup>

          </HtmlToolBar>

          <div class="body">

          <HtmlMessages errorClass="errormsg" globalOnly="true" id="messages" infoClass="infomsg" layout="list" rendered="true" showDetail="false" showSummary="true" styleClass="message" tooltip="false" transient="false" warnClass="warnmsg"/>

          <HtmlForm enctype="application/x-www-form-urlencoded" id="bidSearch" prependId="true" rendered="true" styleClass="edit" submitted="false" transient="false">

              <HtmlSimpleTogglePanel ajaxSingle="false" bypassUpdates="false" id="j_id17" ignoreDupResponses="false" immediate="false" label="Bid Search Filter" limitToList="false" oncollapse="" onexpand="" opened="true" rendered="true" requestDelay="-2147483648" switchType="ajax" timeout="-2147483648" transient="false" width=""/>

              <div class="actionButtons">

              <HtmlCommandButton action="/BidList.xhtml" actionExpression="/BidList.xhtml" disabled="false" id="search" immediate="false" readonly="false" rendered="true" transient="false" type="submit" value="Search"/>

              <HtmlButton action=" disabled="false" id="reset" immediate="false" includePageParams="false" propagation="default" rendered="true" size="-2147483648" transient="false" value="Reset"/>

              </div>

          </HtmlForm>

          <HtmlPanel id="j_id20" rendered="true" transient="false">
              header

              Bid Search Results

              <div class="results" id="bidList">

              <HtmlOutputText escape="true" id="j_id23" transient="false" value="The bid search returned no results."/>

              <HtmlDataTable border="0" captionClass="" cellpadding="0" cellspacing="0" columns="-2147483648" componentState="org.ajax4jsf.component.SequenceDataAdaptor$1@10ae8d6" first="0" footerClass="" headerClass="" id="bidList" rows="0" transient="false" var="_bid">

                  <UIColumn header="org.jboss.seam.ui.component.html.HtmlLink@13c53c8" id="j_id24" rendered="true" transient="false">
                      header

                      <HtmlLink action=" disabled="false" id="j_id25" immediate="false" includePageParams="true" propagation="default" rendered="true" styleClass="columnHeader" transient="false">

                          <UIParameter id="j_id26" name="sort" rendered="true" transient="false" value="bid.bid"/>

                          <UIParameter id="j_id27" name="dir" rendered="true" transient="false"/>

                      </HtmlLink>

                      <HtmlOutputText escape="true" id="j_id28" rendered="true" transient="false"/>

                  </UIColumn>

                  <UIColumn header="org.jboss.seam.ui.component.html.HtmlLink@688800" id="j_id29" rendered="true" transient="false">
                      header

                      <HtmlLink action=" disabled="false" id="j_id30" immediate="false" includePageParams="true" propagation="default" rendered="true" styleClass="columnHeader" transient="false">

                          <UIParameter id="j_id31" name="sort" rendered="true" transient="false" value="bid.user.id"/>

                          <UIParameter id="j_id32" name="dir" rendered="true" transient="false"/>

                      </HtmlLink>

                      <HtmlOutputText escape="true" id="j_id33" rendered="true" transient="false"/>

                  </UIColumn>

                  <HtmlColumn breakBefore="false" colspan="-2147483648" filterEvent="onchange" filterExpression="false" footerClass="" header="Action" headerClass="" id="j_id34" label="" rendered="true" rowspan="-2147483648" selfSorted="true" sortOrder="UNSORTED" sortable="true" styleClass="action" transient="false" visible="true">
                      header

                      Action

                      <HtmlLink action=" disabled="false" id="bid" immediate="false" includePageParams="true" propagation="none" rendered="true" transient="false" value="View" view="/Bid.xhtml">

                          <UIParameter id="j_id36" name="bidBid" rendered="true" transient="false"/>

                      </HtmlLink>

                      #{' '}

                      <HtmlLink action=" disabled="false" id="bidEdit" immediate="false" includePageParams="true" propagation="none" rendered="true" transient="false" value="Edit" view="/BidEdit.xhtml">

                          <UIParameter id="j_id38" name="bidBid" rendered="true" transient="false"/>

                      </HtmlLink>

                  </HtmlColumn>

              </HtmlDataTable>

              </div>

          </HtmlPanel>

          <div class="tableControl">

          <HtmlLink action=" disabled="false" id="firstPage" immediate="false" includePageParams="true" propagation="default" transient="false" value="‹‹ First Page" view="/BidList.xhtml">

              <UIParameter id="j_id41" name="firstResult" rendered="true" transient="false" value="0"/>

          </HtmlLink>

          <HtmlLink action=" disabled="false" id="previousPage" immediate="false" includePageParams="true" propagation="default" transient="false" value="‹ Previous Page" view="/BidList.xhtml">

              <UIParameter id="j_id42" name="firstResult" rendered="true" transient="false"/>

          </HtmlLink>

          <HtmlLink action=" disabled="false" id="nextPage" immediate="false" includePageParams="true" propagation="default" transient="false" value="Next Page ›" view="/BidList.xhtml">

              <UIParameter id="j_id43" name="firstResult" rendered="true" transient="false"/>

          </HtmlLink>

          <HtmlLink action=" disabled="false" id="lastPage" immediate="false" includePageParams="true" propagation="default" transient="false" value="Last Page ››" view="/BidList.xhtml">

              <UIParameter id="j_id44" name="firstResult" rendered="true" transient="false"/>

          </HtmlLink>

          </div>

          <HtmlDiv id="j_id46" rendered="true" styleClass="actionButtons" transient="false">

              <HtmlButton action=" disabled="false" id="create" immediate="false" includePageParams="true" propagation="none" rendered="true" size="-2147483648" transient="false" value="Create bid" view="/BidEdit.xhtml">

                  <UIParameter id="j_id47" name="bidBid" rendered="true" transient="false"/>

              </HtmlButton>

          </HtmlDiv>

          </div> <div class="footer"> Powered by <a href="http://jboss.com/products/seam">Seam</a>. Generated by seam-gen. </div> </body> </html>

      </AjaxViewRoot>

      +- Scoped Variables
      Request ParametersName  Value
      None
      Request AttributesName  Value
      ajaxContext     org.ajax4jsf.context.AjaxContextImpl@a59375
      Session AttributesName  Value
      None
      Application AttributesName      Value
      securityRules   org.jboss.seam.drools.RuleBase@f9510
      19:40:17 14/05/2009 - Generated by Facelets