9 Replies Latest reply on Sep 1, 2010 4:57 AM by vishwa

    Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:

    vishwa


      ERROR [org.jboss.seam.jsf.SeamPhaseListener] [User: Administrator] (SeamPhaseListener.java:68) - uncaught exception
      javax.faces.el.EvaluationException: org.jboss.seam.RequiredException: In attribute requires non-null value: chartQueryWizard.wizardModel
              at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:97)
              at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
              at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
              at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
              at org.jboss.seam.pages.Page.enter(Page.java:229)
              at org.jboss.seam.core.Pages.enterPage(Pages.java:276)
              at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
              at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
              at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:214)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
              at com.subexazure.spark.web.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:87)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at com.subexazure.spark.web.servlet.filter.SecurityFilter.doFilter(SecurityFilter.java:114)
              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:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value: chartQueryWizard.wizardModel
              at org.jboss.seam.Component.getValueToInject(Component.java:1919)
              at org.jboss.seam.Component.injectAttributes(Component.java:1368)
              at org.jboss.seam.Component.inject(Component.java:1195)
              at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
              at 



        • 1. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
          vishwa

          Kindly help :
          We are getting below error when seam object being injected in to the current conversation. Following are the environment details:

          1. JSF Implementation-Version: 1.2_02-b03-FCS
          2. Seam 1.2.1.GA
          3. OS - Linux
          4. Tomcat version 6.0.18

          Details :  we are not getting this exception when tried it on local setup(both windows and linux) and we are using the same versions as specified above.

          Thanks in Advance

          • 2. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
            vishwa

            A small update to the above listed issue is that, we are using
            Oracle 11.1.0.6.0 with character set (WE8ISO8859P1) and it belongs Spanish character set :


            And the output of

            select * from NLS_DATABASE_PARAMETERS;
            
            PARAMETER                      VALUE
            ------------------------------ ----------------------------------------
            NLS_LANGUAGE                   AMERICAN
            NLS_TERRITORY                  AMERICA
            NLS_CURRENCY                   $
            NLS_ISO_CURRENCY               AMERICA
            NLS_NUMERIC_CHARACTERS         .,
            NLS_CHARACTERSET               WE8ISO8859P1
            NLS_CALENDAR                   GREGORIAN
            NLS_DATE_FORMAT                DD-MON-RR
            NLS_DATE_LANGUAGE              AMERICAN
            NLS_SORT                       BINARY
            NLS_TIME_FORMAT                HH.MI.SSXFF AM
            
            PARAMETER                      VALUE
            ------------------------------ ----------------------------------------
            NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
            NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
            NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
            NLS_DUAL_CURRENCY              $
            NLS_COMP                       BINARY
            NLS_LENGTH_SEMANTICS           BYTE
            NLS_NCHAR_CONV_EXCP            FALSE
            NLS_NCHAR_CHARACTERSET         AL16UTF16
            NLS_RDBMS_VERSION              11.1.0.6.0
            


            We are suspecting, the problem could be because of the character set used by the oracle. Can anybody please help me on this?
            Thanks in advance

            • 3. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
              abucs01

              can you show me this chartQueryWizard completely

              • 4. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
                vishwa

                Click HELP for text formatting instructions. Then edit this text and check the preview.


                <?xml version="1.0" encoding="UTF-8"?>
                <!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:f="http://java.sun.com/jsf/core"
                      xmlns:h="http://java.sun.com/jsf/html"
                      xmlns:c="http://java.sun.com/jstl/core"
                      xmlns:s="http://jboss.com/products/seam/taglib"
                      xmlns:sf="http://java.subexazure.com/jsf/core"
                      xmlns:dsh="http://java.subexazure.com/jsf/dashboard"
                      xmlns:sh="http://java.subexazure.com/jsf/html">
                
                  <ui:composition template="/protected/template/wizardTemplate.xhtml">
                       <ui:param name="pageTitle" value="#{chartWizard.pageTitle}"/>
                       
                    <ui:define name="editParameters">               
                          <h:panelGrid columns="1">
                               <h:panelGroup>
                                  <dsh:schemaBrowser instance="#{chartQueryWizard.schemaBrowser}" reRender="chrUsageQueryFl,chrUsageQueryLabel"/>             
                             </h:panelGroup>
                
                               <br/>
                               
                             <h:panelGroup>
                               <sh:groupBox title="Chart SQL Query">
                                    <sh:inputTextarea id="queryArea" cols="110" rows="14" value="#{wizardPage.instance.queryLongString}" required="true"
                                       style="position: relative;left: 3px" requiredMessage="#{chartQueryWizard.requiredMessage}"/>
                                    <br/>
                                    <h:panelGroup id="chartQueryFlag"  style="position: relative;left: 2px">
                                         <h:selectBooleanCheckbox id="chrUsageQueryFl" value="#{wizardPage.instance.chrUsageQueryFl}"  style="width:25px;" disabled="#{not chartQueryWizard.sparkUsageFlagRendered}" />    
                                         <h:outputLabel id="chrUsageQueryLabel" for="chrUsageQueryFl" value="Query contains references to Spark Usage Tables." disabled="#{not chartQueryWizard.sparkUsageFlagRendered}"/>
                                    </h:panelGroup>
                                    <br/>
                                    
                               </sh:groupBox>
                             </h:panelGroup>
                          </h:panelGrid>
                          
                    </ui:define>
                  </ui:composition>
                
                </html>
                



                • 5. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
                  abucs01

                  java class too

                  • 6. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
                    vishwa

                    vishwanath krishna wrote on Sep 01, 2010 04:32:


                    Here is the charQueryWizard.xhtml. I spent some time on analyzing this issue, finally got to know that, request parameters are coming null, as a result it not able to inject the object. Any idea on why request parameters are becoming null  in the server side. ? Kindly help

                    <?xml version="1.0" encoding="UTF-8"?>
                    <!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:f="http://java.sun.com/jsf/core"
                          xmlns:h="http://java.sun.com/jsf/html"
                          xmlns:c="http://java.sun.com/jstl/core"
                          xmlns:s="http://jboss.com/products/seam/taglib"
                          xmlns:sf="http://java.subexazure.com/jsf/core"
                          xmlns:dsh="http://java.subexazure.com/jsf/dashboard"
                          xmlns:sh="http://java.subexazure.com/jsf/html">
                    
                      <ui:composition template="/protected/template/wizardTemplate.xhtml">
                           <ui:param name="pageTitle" value="#{chartWizard.pageTitle}"/>
                           
                        <ui:define name="editParameters">               
                              <h:panelGrid columns="1">
                                   <h:panelGroup>
                                      <dsh:schemaBrowser instance="#{chartQueryWizard.schemaBrowser}" reRender="chrUsageQueryFl,chrUsageQueryLabel"/>             
                                 </h:panelGroup>
                    
                                   <br/>
                                   
                                 <h:panelGroup>
                                   <sh:groupBox title="Chart SQL Query">
                                        <sh:inputTextarea id="queryArea" cols="110" rows="14" value="#{wizardPage.instance.queryLongString}" required="true"
                                           style="position: relative;left: 3px" requiredMessage="#{chartQueryWizard.requiredMessage}"/>
                                        <br/>
                                        <h:panelGroup id="chartQueryFlag"  style="position: relative;left: 2px">
                                             <h:selectBooleanCheckbox id="chrUsageQueryFl" value="#{wizardPage.instance.chrUsageQueryFl}"  style="width:25px;" disabled="#{not chartQueryWizard.sparkUsageFlagRendered}" />    
                                             <h:outputLabel id="chrUsageQueryLabel" for="chrUsageQueryFl" value="Query contains references to Spark Usage Tables." disabled="#{not chartQueryWizard.sparkUsageFlagRendered}"/>
                                        </h:panelGroup>
                                        <br/>
                                        
                                   </sh:groupBox>
                                 </h:panelGroup>
                              </h:panelGrid>
                              
                        </ui:define>
                      </ui:composition>
                    
                    </html>
                    






                    Click HELP for text formatting instructions. Then edit this text and check the preview.

                    • 7. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
                      vishwa

                      vishwanath krishna wrote on Sep 01, 2010 04:36:



                      vishwanath krishna wrote on Sep 01, 2010 04:32:


                      Here is the charQueryWizard.xhtml. I spent some time on analyzing this issue, finally got to know that, request parameters are coming null, as a result it not able to inject the object. Any idea on why request parameters are becoming null  in the server side. ? Kindly help

                      <?xml version="1.0" encoding="UTF-8"?>
                      <!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:f="http://java.sun.com/jsf/core"
                            xmlns:h="http://java.sun.com/jsf/html"
                            xmlns:c="http://java.sun.com/jstl/core"
                            xmlns:s="http://jboss.com/products/seam/taglib"
                            xmlns:sf="http://java.subexazure.com/jsf/core"
                            xmlns:dsh="http://java.subexazure.com/jsf/dashboard"
                            xmlns:sh="http://java.subexazure.com/jsf/html">
                      
                        <ui:composition template="/protected/template/wizardTemplate.xhtml">
                              <ui:param name="pageTitle" value="#{chartWizard.pageTitle}"/>
                              
                          <ui:define name="editParameters">                     
                                      <h:panelGrid columns="1">
                                              <h:panelGroup>
                                                 <dsh:schemaBrowser instance="#{chartQueryWizard.schemaBrowser}" reRender="chrUsageQueryFl,chrUsageQueryLabel"/>                   
                                         </h:panelGroup>
                      
                                              <br/>
                                              
                                         <h:panelGroup>
                                              <sh:groupBox title="Chart SQL Query">
                                                      <sh:inputTextarea id="queryArea" cols="110" rows="14" value="#{wizardPage.instance.queryLongString}" required="true"
                                                      style="position: relative;left: 3px" requiredMessage="#{chartQueryWizard.requiredMessage}"/>
                                                      <br/>
                                                      <h:panelGroup id="chartQueryFlag"  style="position: relative;left: 2px">
                                                              <h:selectBooleanCheckbox id="chrUsageQueryFl" value="#{wizardPage.instance.chrUsageQueryFl}"  style="width:25px;" disabled="#{not chartQueryWizard.sparkUsageFlagRendered}" />    
                                                              <h:outputLabel id="chrUsageQueryLabel" for="chrUsageQueryFl" value="Query contains references to Spark Usage Tables." disabled="#{not chartQueryWizard.sparkUsageFlagRendered}"/>
                                                      </h:panelGroup>
                                                      <br/>
                                                      
                                           </sh:groupBox>
                                         </h:panelGroup>
                                      </h:panelGrid>
                                      
                          </ui:define>
                        </ui:composition>
                      
                      </html>
                      




                      @Name( "chartQueryWizard" )
                      
                      public class ChartQueryWizard extends EntityWizardPage<Chart>
                      {
                              @Override
                              public String getViewId()
                              {
                                      return "/chart/chartQueryWizard.xhtml";
                              }
                      
                              @Override
                              public void pageAction()
                              {
                                      getInstance().setDashboardServer( ( (ChartWizard) getWizardModel() ).getSchemaBrowser().getDashboardServer() );
                      
                                      if( !( (ChartWizard) getWizardModel() ).getSchemaBrowser().isSparkDatabase() )
                                              getInstance().setChrUsageQueryFl( false );
                              }
                      
                              @Override
                              public void executeNext()
                              {
                                      super.executeNext();
                                      ( (ChartWizard) getWizardModel() ).updateChartSeriess();
                              }
                      
                              protected WizardPage getNextPage()
                              {
                                      ( (ChartWizard) getWizardModel() ).setLastVisitedPage( this );
                      
                                      return ( (ChartWizard) getWizardModel() ).getMappingPage();
                              }
                      
                              private void validateQuery() throws SparkException
                              {
                                      ( (ChartWizard) getWizardModel() ).prepareDatasource();
                              }
                      
                              @Override
                              protected boolean validate()
                              {
                                      boolean valid = true;
                                      try
                                      {
                                              validateQuery();
                                      }
                                      catch( Exception e )
                                      {
                                              System.out.println("Vishwa: Printing StackTrace during Query Execution");
                                              e.printStackTrace();
                                              valid = false;
                                              List<HtmlInputTextarea> component = ComponentSupport.findComponentsOfType( getParameterGrid(),
                                                              HtmlInputTextarea.class );
                                              for( HtmlInputTextarea textArea : component )
                                              {
                                                      String errMsg = SparkString.create( "Query Failed: %1", e.getMessage().trim() );
                                                      FacesMessages.instance().addToControl( textArea.getId(), new FacesMessage( errMsg ) );
                                              }
                                      }
                                      return valid;
                              }
                      
                              @Override
                              protected WizardPage getBackPage()
                              {
                                      return (WizardPage) Component.getInstance( ( (ChartWizard) getWizardModel() ).getLastVisitedPage(),
                                                      ScopeType.CONVERSATION );
                              }
                      
                              @Override
                              public String getPageTitle()
                              {
                                      return SparkString.create( "Query Editor" );
                              }
                      
                              @Override
                              public boolean isBackButtonRendered()
                              {
                                      return true;
                              }
                      
                              @Override
                              public boolean isNextButtonRendered()
                              {
                                      return true;
                              }
                      
                              public SchemaBrowser getSchemaBrowser()
                              {
                                      SchemaBrowser schemaBrowser = ( (ChartWizard) getWizardModel() ).getSchemaBrowser();
                                      schemaBrowser.setShowDisplayName( false );
                                      schemaBrowser.setAqbFlow( false );
                                      return schemaBrowser;
                              }
                      
                              public boolean isSparkUsageFlagRendered() throws SparkException
                              {
                                      boolean isSparkUsage = ( (ChartWizard) getWizardModel() ).getSchemaBrowser().isSparkDatabase();
                                      if( !isSparkUsage )
                                              getInstance().setChrUsageQueryFl( false );
                      
                                      return isSparkUsage;
                              }
                      
                              @Override
                              public boolean isAutoLayoutParameterGrid()
                              {
                                      return false;
                              }
                      
                              public String getRequiredMessage()
                              {
                                      return ValidationHelper.REQUIRED_MESSAGE;
                              }
                      }






                      • 8. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
                        abucs01

                        i cant analyse but can you  try



                        @In(required="false") 




                        annotation above wizardModel

                        • 9. Re: Exception while injecting seam object -- Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value:
                          vishwa

                          Thanks for the reply. I will try this and update you.