1 Reply Latest reply on Aug 28, 2007 10:17 AM by Julien Martin

    Ajax4jsf and trinidad question...

    Julien Martin Expert

      Hello,

      I am trying to get a4j and trinidad working together. I have not being able to download the a4j-trinidad.war file due to restriction policies on downloading (in my company).

      I use the following jars:

      -a4j 1.1.1
      -myfaces 1.1.5
      -trinidad 1.0.2
      -aj4-trinidad.jar

      and I have the following web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.SCHEMA</param-name>
       <param-value>calyonqa</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.CORRESPONDANT</param-name>
       <param-value>Lecuirot Agnes</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.DATE_ARRETE</param-name>
       <param-value>200703</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.ENV</param-name>
       <param-value>T</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.outputFilePathAndName</param-name>
       <param-value>N:\data\Developpement\Developpement Doc\Banque de France\protide\jm\output\TCC_CF_test.xml</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.databaseUrlHeader</param-name>
       <param-value>jdbc:as400:</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.databaseName</param-name>
       <param-value>AS400D.CALYONFINANCIAL.COM</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.databaseUser</param-name>
       <param-value>jmartin</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.databasePassword</param-name>
       <param-value>martin6</param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.databaseDriverName</param-name>
       <param-value>com.ibm.as400.access.AS400JDBCDriver</param-value>
       </context-param>
      
       <context-param>
       <param-name>com.calyonfinancial.protide.PR01</param-name>
       <param-value>
       select
       POTRFOLIO_TYPE,
       HOLDING_TYPE,
       HOLDER_INDUSTRY,
       HOLDER_AREA,
       HOLDER_SOCIAL_ECON_CATEGORY,
       HOLDER_AGE,
       AMOUNT_RANGE,
       INSTRUMENT_TYPE,
       MATURITY,
       CURRENCY,
       ISSUER_AREA,
       ISSUER_INDUSTRY,
       sum(previous_period_outstanding) as previous_period_outstanding,
       sum(current_period_outstanding) as current_period_outstanding,
       NUMBER_OF_ACCOUNTS
       from (
       select
       POTRFOLIO_TYPE,
       HOLDING_TYPE,
       HOLDER_INDUSTRY,
       HOLDER_AREA,
       HOLDER_SOCIAL_ECON_CATEGORY,
       HOLDER_AGE,
       AMOUNT_RANGE,
       INSTRUMENT_TYPE,
       MATURITY,
       CURRENCY,
       ISSUER_AREA,
       ISSUER_INDUSTRY,
       (case when equity_date = ? then sum(cash_flow) else 0 end) as previous_period_outstanding,
       (case when equity_date = ? then sum(cash_flow) else 0 end) as current_period_outstanding,
       NUMBER_OF_ACCOUNTS
       from PROTIDE01P_view
       where cash_flow_type = 'XXX' and equity_date between ? and ?
       group by
       POTRFOLIO_TYPE,
       HOLDING_TYPE,
       HOLDER_INDUSTRY,
       HOLDER_AREA,
       HOLDER_SOCIAL_ECON_CATEGORY,
       HOLDER_AGE,
       AMOUNT_RANGE,
       INSTRUMENT_TYPE,
       MATURITY,
       CURRENCY,
       ISSUER_AREA,
       ISSUER_INDUSTRY,
       NUMBER_OF_ACCOUNTS,
       equity_date ) as p
       group by
       POTRFOLIO_TYPE,
       HOLDING_TYPE,
       HOLDER_INDUSTRY,
       HOLDER_AREA,
       HOLDER_SOCIAL_ECON_CATEGORY,
       HOLDER_AGE,
       AMOUNT_RANGE,
       INSTRUMENT_TYPE,
       MATURITY,
       CURRENCY,
       ISSUER_AREA,
       ISSUER_INDUSTRY,
       NUMBER_OF_ACCOUNTS
       </param-value>
       </context-param>
       <context-param>
       <param-name>com.calyonfinancial.protide.PR02</param-name>
       <param-value>
       SELECT
       sum(cash_Flow) as sum_cash_flow,
       potrfolio_Type,
       holding_Type,
       holder_Industry,
       holder_Area,
       instrument_Type,
       maturity,
       currency,
       issuer_Area,
       issuer_Industry,
       cash_Flow_Type
       FROM Protide01p_View
       where cash_Flow_Type != 'XXX' and equity_date between ? and ?
       group by potrfolio_Type,
       holding_Type,
       holder_Industry,
       holder_Area,
       instrument_Type,
       maturity,
       currency,
       issuer_Area,
       issuer_Industry,
       cash_Flow_Type
       </param-value>
       </context-param>
       <context-param>
       <description>Protide Application version</description>
       <param-name>com.calyonfinancial.protide.VERSION</param-name>
       <param-value>beta12</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
       <param-value>true</param-value>
       </context-param>
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       <init-param>
       <param-name>forceparser</param-name>
       <param-value>false</param-value>
       </init-param>
       </filter>
      
       <filter>
       <filter-name>extensionsFilter</filter-name>
       <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
       <init-param>
       <param-name>uploadMaxFileSize</param-name>
       <param-value>100m</param-value>
       </init-param>
       <init-param>
       <param-name>uploadThresholdSize</param-name>
       <param-value>800k</param-value>
       </init-param>
       </filter>
      
       <filter>
       <filter-name>Trinidad</filter-name>
       <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Trinidad</filter-name>
       <!-- <servlet-name>Faces Servlet</servlet-name> -->
       <url-pattern>/faces/*</url-pattern>
       </filter-mapping>
      
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <filter-mapping>
       <filter-name>extensionsFilter</filter-name>
       <url-pattern>/faces/*</url-pattern>
       </filter-mapping>
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet>
       <servlet-name>resources</servlet-name>
       <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>/faces/*</url-pattern><!-- *.jsf -->
       </servlet-mapping>
      
       <servlet-mapping>
       <servlet-name>resources</servlet-name>
       <url-pattern>/adf/*</url-pattern>
       </servlet-mapping>
      
       <session-config>
       <session-timeout>
       30
       </session-timeout>
       </session-config>
       <welcome-file-list>
       <welcome-file>/faces/home.jsp</welcome-file>
       </welcome-file-list>
       <!--
       <security-constraint>
       <display-name>ProtideConstraint</display-name>
       <web-resource-collection>
       <web-resource-name>PROTIDE</web-resource-name>
       <description>PROTIDE</description>
       <url-pattern>/*</url-pattern>
       <http-method>GET</http-method>
       <http-method>POST</http-method>
       <http-method>HEAD</http-method>
       <http-method>PUT</http-method>
       <http-method>OPTIONS</http-method>
       <http-method>TRACE</http-method>
       <http-method>DELETE</http-method>
       </web-resource-collection>
       <auth-constraint>
       <description/>
       <role-name>AUTHENTICATED_USER</role-name>
       </auth-constraint>
       <user-data-constraint>
       <description/>
       <transport-guarantee>NONE</transport-guarantee>
       </user-data-constraint>
       </security-constraint>
       <login-config>
       <auth-method>FORM</auth-method>
       <realm-name>CarrMulti</realm-name>
       <form-login-config>
       <form-login-page>/login/login.jsp</form-login-page>
       <form-error-page>/login/loginerror.jsp</form-error-page>
       </form-login-config>
       </login-config>
       <security-role>
       <description/>
       <role-name>AUTHENTICATED_USER</role-name>
       </security-role>
       <resource-ref>
       <res-ref-name>DB2400</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       <res-sharing-scope>Shareable</res-sharing-scope>
       </resource-ref>
       -->
      </web-app>
      


      As of now I get the following types of errors:


      java.lang.NullPointerException
       at org.apache.myfaces.trinidadinternal.renderkit.htmlBasic.HtmlCommandButtonRenderer.encodeBegin(HtmlCommandButtonRenderer.java:95)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.AbstractTableRenderer.encodeOneRow(AbstractTableRenderer.java:237)
       at org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:86)
       at org.ajax4jsf.ajax.repeat.SequenceDataModel.walk(SequenceDataModel.java:101)
       at org.ajax4jsf.ajax.repeat.UIDataAdaptor.walk(UIDataAdaptor.java:917)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:103)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeChildren(AbstractRowsRenderer.java:135)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
       at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:159)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:97)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:150)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:97)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:150)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:97)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:150)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:97)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:150)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:97)
       at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:150)
       at org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:125)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:549)
       at org.ajax4jsf.framework.ajax.AjaxContext.renderAjaxRegion(AjaxContext.java:307)
       at org.ajax4jsf.framework.ajax.AjaxContext$2.invoke(AjaxContext.java:222)
       at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:75)
       at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnComponent(AjaxContext.java:178)
       at org.ajax4jsf.framework.ajax.AjaxContext.renderSubmittedAjaxRegion(AjaxContext.java:236)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:256)
       at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
       at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:253)
       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:210)
       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:164)
       at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:595)
      
      
      



      Can anyone please help?

      Thanks in advance,

      Julien Martin.