Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: Configure & Build Application ON PENTAHO on TOMCAT

  1. #1

    Default Configure & Build Application ON PENTAHO on TOMCAT

    HI,

    1) We are not asking for the configuration of PCI on TOMCAT

    2) The Issue we are facing is WE have the JAR files as well as PENTAHO Server Source.

    3) We want to deploy this Server on our TOMCAT

    4) Then we want to build our custom application using PENTAHO.

    5) We have our Struts Application running and We want to call the XAction Sequence from our Struts Action event

    6) So as said above we have the jar files as source code. We have TOM Cat installed. We have Pentaho Designer Studio Installed.

    Again : Here we are not talking of the PCI given by Pentaho. Here we are looking fo Isolated deployment of PENTAHO on our Server and build custom application on it.

    Thanks a lot in Advance. We are hoping we will get responce to our Query.

    Best Regards
    satvindermann

    Post edited by: satvindermann, at: 08/28/2006 03:18

  2. #2
    Join Date
    Nov 1999
    Posts
    579

    Default Re:Configure & Build Application ON PENTAHO on TOM

    I understand that you don't want the PCI in Tomcat, but you do want Pentaho functionality in your own application within Tomcat.

    This should be no problem at all. I suggest you have a quick look at the pentaho.jar that gets built by ANT (via the build.xml). This has all the pentaho classes in it, nicely packaged for drop-in to any java environment. Before you can just call functions however, there are setup and initialization calls that must be made.

    I suggest you look at the startup hooks we have in the PCI that will show you how things get initialized. Specifically, we have a context listener that calls into the PentahoSystem object and initializes it. And, on shutdown, the listener calls back into PentahoSystem to close things out.

    Finally, in SVN, you should be able to find our pentaho standalone project. If for example, you're looking to run things without object persistence, the pentaho standalone project has demonstrations of doing this if I'm not mistaken.

    But, I think your best bet is to:

    a- Build the pentaho.xx.jar

    b- Build your own servlet context listener class like the one in the PCI for system initialization, or simply use ours.

    c- Create a pentaho.xml that has only the listeners and system objects you want. For example, if you don't need BIRT, remove the BIRT system listener from the pentaho.xml. Same with workflow and the others.

    I hope this helps,

    Marc

  3. #3

    Default Re:Configure & Build Application ON PENTAHO on TOM

    Sir, Thanks a lot for the quick respose.

    What my understanding now is:
    1) Build War file.
    2) Deploy the war file
    3) There is a context listener that calls into the PentahoSystem object and initializes it.
    4) We will use the existing context listner only

    My Query is:

    1) How do i initialize this. What action do i need to take in my TOMCAT so that the Pentaho set up and installation and initialization takes plase and it is ready to run.

    2) I have a struts application. And i want to use to send a request from the Struts Action Event (java class) to the Pentaho XAction.

    Or in other ways how should i go about developing Business applications over Pentaho.

    I know how to create Pentaho component / Action sequence. But i dont know how to add it into my Pentaho Project and then deploy the Pentaho project into TOMCAT and run the same.

    Thanks in advance,
    satvindermann

  4. #4
    Join Date
    Nov 1999
    Posts
    579

    Default Re:Configure & Build Application ON PENTAHO on TOM

    satvindermann,

    For J2EE context listeners, you need to consult J2EE documentation, or you can look at our pentaho.war to see what we're doing.

    As far as deployment of your reports and action sequences, our sample solution and the documentation available from Sourceforge should be sufficient. I suggest you take a closer look at the pre-configured install to see how these pieces fit together.

    Between the pre-configured installation (called the Pentaho Demo on Sourceforge), the Advanced Installation Guide (which tells you how to deploy to Tomcat), the Quick Start guide (which talks about the solution folder and solutions in general), the Customizing Deployments guide, and the Creating Solutions guide, you should have everything you need.

    All the documentation is available on sourceforge.

  5. #5
    jdixon Guest

    Default Re:Configure & Build Application ON PENTAHO on TOM

    The minimum code you need (including initializing the Pentaho system) to execute an action sequence from your code is:

    Code:
    // We need to be able to locate the solution files. in this example, we are using the relative path in our project/package. 
    File solutionRoot = new File( "resource/solution" );
    			
    // Create a standalone application context - our application toolbox if you will - passing the path to the solution files. 
    IApplicationContext context = new StandaloneApplicationContext( solutionRoot.getAbsolutePath(), new File("."«»).getAbsolutePath() ); //$NON-NLS-1$ //$NON-NLS-2$
    
    // Initialize the Pentaho system
    PentahoSystem.init( context );
    
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream(f);
    HashMap parameters = new HashMap();
    
    // run an action sequence			
    ISolutionEngine solutionEngine = SolutionHelper.execute( "Simple Case Example", "Simple Report", "getting-started/JFree_Quad.xaction", parameters, outputStream  ); //$NON-NLS-2$
    James

  6. #6

    Default Re:Configure & Build Application ON PENTAHO on TOM

    Sir,

    Thanks a lot for the response.

    The Issue now I am facing is in INITIALIZATION, i have My Project COnfigured in Pentaho Designer Studio.

    I Create a Servlet and in that servlet's INIT Method i write the code to Initialize the Pentaho.

    On the line PentahoSystem.init( context );

    I get an error:Sytaxt Error on Token Contex, Variable declerator ID Expected after this token.

    Syntax error on Token, Misplaced Constructs.

    Note : We want this to be on a J2EE environment and not a stand alone Environment.

    I have all libraries and Source code in my Class Path

    I have one more Query:

    In Pentaho Demo Installation, Where is this Initialization code for the Pentaho system Present. I might some idea from there. Is this initialization done in a servet in Pentaho.war.

    Thanks in advance,
    satvindermann

  7. #7

    Default Re:Configure & Build Application ON PENTAHO on TOM

    Hi Sir,

    Please help me on this.

    Thanks in advance,

  8. #8
    Join Date
    Feb 2008
    Posts
    4

    Default Stand alone application

    // We need to be able to locate the solution files. in this example, we are using the relative path in our project/package.
    File solutionRoot = new File( "E:/PENTAHO-PRODUCTS/bi-server/pentaho-solutions" );

    // Create a standalone application context - our application toolbox if you will - passing the path to the solution files.
    IApplicationContext context = new StandaloneApplicationContext(solutionRoot.getAbsolutePath(),"E:/PENTAHO-PRODUCTS/bi-server/pentaho-solutions" ); //$NON-NLS-1$ //$NON-NLS-2$
    //System.out.println("89898989898"+context.getPentahoServerName()+"ss");
    // Initialize the Pentaho system
    PentahoSystem.init( context );
    return true;


    This is my code. i cannot initialize the pentaho system.
    i get a null pointer exception.
    The solution files i directly pointed to the one which i got when i installed pentaho.
    Can any one tell me where i should set the server credentials ti init the setup?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.