3 Replies Latest reply on Aug 26, 2014 4:31 AM by Zachary Price

    Teiid VDB and Pentaho Xaction

    Zachary Price Newbie

      Hello,

       

      Has anyone had any experience pulling data from a VDB using a Pentaho xaction? When I attempt to execute my xaction through the Pentaho User Console I get a blank report. Here is the error that shows up in the log as soon as I execute the xaction..

       

      03:55:49,732 ERROR [ExpressionEventHelper] Failed to fire report-done event: java.lang.NullPointerException
      

       

      Here are the contents of the xaction file I am attempting to execute. Any ideas are greatly appreciated.

       

      <?xml version="1.0" encoding="UTF-8"?>
          <action-sequence>
              <version>1</version>
              <logging-level>ERROR</logging-level>
              <documentation>
                  <author>Michael D'Amour</author>
                  <description>Testing VDB connectivity.</description>
                  <help/>
                  <result-type>report</result-type>
                  <icon/>
              </documentation>
              
              <inputs>
                  <outputType type="string">
                      <default-value>text/html</default-value>
                      <sources>
                          <request>outputType</request>
                      </sources>
                  </outputType>
                  <outputTypeList type="property-map-list">
                      <sources>
                          <runtime>outputTypeList</runtime>
                      </sources>
                      <default-value type="property-map-list">
                          <property-map>
                              <entry key="report-output-desc">PDF</entry>
                              <entry key="report-output-type-id">application/pdf</entry>
                          </property-map>
                          <property-map>
                              <entry key="report-output-desc">Excel</entry>
                              <entry key="report-output-type-id">application/vnd.ms-excel</entry>
                          </property-map>
                          <property-map>
                              <entry key="report-output-desc">Web Page</entry>
                              <entry key="report-output-type-id">text/html</entry>
                          </property-map>
                      </default-value>
                  </outputTypeList>
              </inputs>
              
              <outputs>
                  <myReport type="content" is-output-parameter="true">
                      <destinations>
                          <response>content</response>
                      </destinations>
                  </myReport>
              </outputs>
              
              <resources>
                  <reportDefinition>
                      <solution-file>
                          <location>testreport.prpt</location>
                          <mime-type>application/zip</mime-type>
                      </solution-file>
                  </reportDefinition>
              </resources>
              
              <actions>
                  <action-definition>
                      <component-name>SecureFilterComponent</component-name>
                      <action-type>Prompt for Product Line and Report Format</action-type>
                      <action-inputs>
                          <outputTypeList type="property-map-list"/>
                          <outputType type="string"/>
                      </action-inputs>
                      <component-definition>
                          <selections>
                              <outputType style="radio">
                                  <title>Select Report Format</title>
                                  <filter value-col-name="report-output-type-id" display-col-name="report-output-desc">outputTypeList</filter>
                              </outputType>
                          </selections>
                      </component-definition>
                  </action-definition>
                  
                  <action-definition>
                      <component-name>SQLLookupRule</component-name>
                      <action-type>SQL Query For Report Data</action-type>
                      <action-outputs>
                          <query-result type="result-set"/>
                      </action-outputs>
                      <component-definition> 
                          <query><![CDATA[SELECT * FROM test.account]]></query>  
                          <live><![CDATA[true]]></live>  
                          <driver><![CDATA[org.teiid.jdbc.TeiidDriver]]></driver>  
                          <connection><![CDATA[jdbc:teiid:NewVDB@mm://192.168.1.105:31000]]></connection>  
                          <password><![CDATA[user]]></password>  
                          <user-id><![CDATA[user]]></user-id> 
                      </component-definition>
                  </action-definition>
                  
                  <action-definition>
                      <component-name>SimpleReportingComponent</component-name>
                      <action-type>Generate the report using a solution path to the report definition</action-type>
                      <component-definition/>
                      <action-resources>
                          <reportDefinition type="resource"/>
                      </action-resources>
                      <action-inputs>
                          <queryData type="result-set" mapping="query-result"/>
                          <outputType type="string"/>
                      </action-inputs>
                      <action-outputs>
                          <outputstream type="content" mapping="myReport"/>
                      </action-outputs>
                  </action-definition>
              </actions>
          </action-sequence>
      
        • 1. Re: Teiid VDB and Pentaho Xaction
          Steven Hawkins Master

          Do you have more of the stack trace?

          • 2. Re: Re: Teiid VDB and Pentaho Xaction
            Zachary Price Newbie

            Hello Steven,

             

            Here is a slightly more detailed entry:

             

            2014-08-25 17:40:55,804 ERROR [org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper] Failed to fire report-done event: java.lang.NullPointerException
            

             

            This is the only entry that shows up in pentaho.log, however.

             

            It appears as soon as I go to the following link in my browser:

            http://localhost:8080/pentaho/api/repos/:public:first_solution:test.xaction/generatedContent

             

             

            Zach

            • 3. Re: Re: Re: Teiid VDB and Pentaho Xaction
              Zachary Price Newbie

              Using a very basic xaction I am able to query the VDB:

               

              <?xml version="1.0" encoding="UTF-8"?>
                  <action-sequence>
                      <version>1</version>
                      <logging-level>ERROR</logging-level>
                      <documentation>
                          <author>Zachary Price</author>
                          <description>Testing VDB connectivity.</description>
                          <help/>
                          <result-type>report</result-type>
                          <icon/>
                      </documentation>
                      
                      <inputs/>
                      
                      <outputs>
                          <rule-result type="result-set"/>
                      </outputs>
                      
                      <resources/>
                      
                      <actions>
                          <action-definition>
                              <component-name>SQLLookupRule</component-name>
                              <action-type>SQL Query For Report Data</action-type>
                              <action-outputs>
                                  <query-result type="result-set" mapping="rule-result"/>
                              </action-outputs>
                              <component-definition> 
                                  <query><![CDATA[SELECT * FROM test.account]]></query>  
                                  <live><![CDATA[true]]></live>  
                                  <driver><![CDATA[org.teiid.jdbc.TeiidDriver]]></driver>  
                                  <connection><![CDATA[jdbc:teiid:NewVDB@mm://192.168.1.105:31000]]></connection>  
                                  <password><![CDATA[user]]></password>  
                                  <user-id><![CDATA[user]]></user-id> 
                              </component-definition>
                          </action-definition>
                          
                      </actions>
                  </action-sequence>
              

               

              I must have a syntax error somewhere in the other xaction I originally posted. Here is where I found it.. http://infocenter.pentaho.com/help48/topic/action_sequence_guide/action_sequence_guide.pdf