3 Replies Latest reply on Apr 1, 2009 9:16 PM by Moissane Hernández

    Error reading 'resultList' on type

    Moissane Hernández Newbie

      Well I´m using Seam 2.0 with tomcat 6 and MySQL 5. I have the following configuration files:


      In my components.xml



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
           xmlns:core="http://jboss.com/products/seam/core"
           xmlns:persistence="http://jboss.com/products/seam/persistence"
           xmlns:drools="http://jboss.com/products/seam/drools"
           xmlns:bpm="http://jboss.com/products/seam/bpm"
           xmlns:security="http://jboss.com/products/seam/security"
           xmlns:mail="http://jboss.com/products/seam/mail"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:transaction="http://jboss.com/products/seam/transaction"
           xmlns:web="http://jboss.com/products/seam/web"
           xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd 
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">     <core:init debug="true" />
      
           <transaction:entity-transaction entity-manager="#{entityManager}"/>
      
           <core:manager concurrent-request-timeout="500"
                conversation-timeout="120000" conversation-id-parameter="cid" />
      
           <persistence:managed-persistence-context name="entityManager"
                auto-create="true"
                entity-manager-factory="#{testEntityManagerFactory}" />
      
           <persistence:entity-manager-factory     name="testEntityManagerFactory" 
           persistence-unit-name="test" />
           
      
           <drools:rule-base name="securityRules">
                <drools:rule-files>
                     <value>/security.drl</value>
                </drools:rule-files>
           </drools:rule-base>
      
           <security:identity
                authenticate-method="#{authenticator.authenticate}"
                security-rules="#{securityRules}" remember-me="true" />
      
           <event type="org.jboss.seam.notLoggedIn">
                <action execute="#{redirect.captureCurrentView}" />
           </event>
           <event type="org.jboss.seam.postAuthenticate">
                <action execute="#{redirect.returnToCapturedView}" />
           </event>
      
           <web:context-filter url-pattern="/test" />
      
           <!--  
         <mail:mail-session host="localhost" port="2525" username="test" password="test" />
           -->
      
           <!-- For use with jBPM pageflow or process management -->
           <!--  
                <bpm:jbpm>
                <bpm:process-definitions></bpm:process-definitions>
                <bpm:pageflow-definitions></bpm:pageflow-definitions>
                </bpm:jbpm>
           -->
      
      </components>
      


      In my persistence.xml


      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Persistence deployment descriptor for dev profile -->
      <persistence xmlns="http://java.sun.com/xml/ns/persistence" 
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
                   version="1.0">
         <persistence-unit name="test" transaction-type="RESOURCE_LOCAL">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>java:comp/env/jdbc/testDB</jta-data-source>
            <properties>
               <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
               <property name="hibernate.hbm2ddl.auto" value="update"/>
               <property name="hibernate.show_sql" value="true"/>
               <property name="hibernate.format_sql" value="true"/>
            <!--   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/> -->
            </properties>
         </persistence-unit>
          
      </persistence>
      


      In my context.xml I placed into WebContent/META-INF



      <?xml version="1.0" encoding="UTF-8"?>
      
      <Context path="/test" docBase="test" debug="5" reloadable="true"
           crossContext="true">
      
           <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
                maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/testDB"
                type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/regclientes_db" 
                username="root" password="admin" />
                     
      </Context>



      In my web.xml



      <?xml version="1.0" ?>
      <web-app xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           version="2.5">
      
           <!-- Ajax4jsf -->
      
           <context-param>
                <param-name>org.richfaces.SKIN</param-name>
                <param-value>blueSky</param-value>
           </context-param>
      
           <!-- Seam -->
      
           <listener>
                <listener-class>
                     org.jboss.seam.servlet.SeamListener
                </listener-class>
           </listener>
      
           <filter>
                <filter-name>Seam Filter</filter-name>
                <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
           </filter>
      
           <filter-mapping>
                <filter-name>Seam Filter</filter-name>
                <url-pattern>/*</url-pattern>
           </filter-mapping>
      
           <servlet>
                <servlet-name>Seam Resource Servlet</servlet-name>
                <servlet-class>
                     org.jboss.seam.servlet.SeamResourceServlet
                </servlet-class>
           </servlet>
      
           <servlet-mapping>
                <servlet-name>Seam Resource Servlet</servlet-name>
                <url-pattern>/seam/resource/*</url-pattern>
           </servlet-mapping>
      
           <!-- Facelets development mode (disable in production) -->
           <!--  
                <context-param>
                <param-name>facelets.DEVELOPMENT</param-name>
                <param-value>true</param-value>
                </context-param>
           -->
      
           <!-- JSF -->
      
           <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>.xhtml</param-value>
           </context-param>
      
           <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
           </servlet>
      
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.seam</url-pattern>
           </servlet-mapping>
      
           <security-constraint>
                <display-name>Restrict raw XHTML Documents</display-name>
                <web-resource-collection>
                     <web-resource-name>XHTML</web-resource-name>
                     <url-pattern>*.xhtml</url-pattern>
                </web-resource-collection>
                <auth-constraint />
           </security-constraint>
      
           <resource-ref>
                <description>DB Connection</description>
                <res-ref-name>jdbc/testDB</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
           </resource-ref>
      
      </web-app>
      



      When I tried to the ConfigList.xhtml(this is a generated Seam file) I got the following errors:



      Exception during request processing: 
      Caused by javax.servlet.ServletException with message: "/ConfigList.xhtml @39,59 rendered="#{empty configList.resultList}": Error reading 'resultList' on type org.domain.test.session.ConfigList_$$_javassist_0" 
      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.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.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      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:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Unknown Source)Caused by javax.el.ELException with message: "/ConfigList.xhtml @39,59 rendered="#{empty configList.resultList}": Error reading 'resultList' on type org.domain.test.session.ConfigList_$$_javassist_0" 
      com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
      javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
      org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
      org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
      org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
      org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
      org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      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.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      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:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Unknown Source)Caused by java.lang.reflect.InvocationTargetException with message: "" 
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
      org.jboss.seam.util.Work.workInTransaction(Work.java:40)
      org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
      org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
      org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
      org.domain.test.session.ConfigList_$$_javassist_0.getResultList(ConfigList_$$_javassist_0.java)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
      javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
      org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
      org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
      org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:29)
      org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
      com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
      org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
      org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
      org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
      org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
      org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      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.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      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:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Unknown Source)



      Please, any idea about this error will be accepted gratefully!