Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Documentation for testing

  1. #1
    Join Date
    Sep 2005
    Posts
    22

    Default Documentation for testing

    hi

    I have done some reports using pentaho
    On those examples i called pentaho from my application through URL
    but i know we can call it directly from java object

    The problem is i have not find any documents for using the pentaho as a jar file and how to se the pentah-solution path and everything ...

    I tried to call as we have it in ReportingTest.java

    but i got the following error

    Code:
    20:32:07,997 ERROR [Logger] misc-org.pentaho.system.PentahoSystem: Error while trying to execute startup sequence for {0}org.pentaho.scheduler.QuartzSystemListener
    20:32:09,047 ERROR [HibernateUtil] HIBUTIL.ERROR_0006 - Building SessionFactory failed.
    java.lang.NullPointerException
    	at org.pentaho.repository.HibernateUtil.initialize(HibernateUtil.java:90)
    	at org.pentaho.repository.HibernateUtil.(HibernateUtil.java:57)
    	at org.pentaho.repository.runtime.RuntimeRepository.setSession(RuntimeRepository.java:67)
    	at org.pentaho.repository.runtime.RuntimeRepository.getInstance(RuntimeRepository.java:59)
    	at org.pentaho.solution.SolutionEngine.execute(SolutionEngine.java:110)
    	at org.pentaho.test.BaseTest.run(BaseTest.java:196)
    	at org.pentaho.test.BaseTest.run(BaseTest.java:176)
    	at org.pentaho.test.BaseTest.run(BaseTest.java:158)
    	at org.pentaho.test.BaseTest.run(BaseTest.java:138)
    	at org.pentaho.test.RuntimeTest.testComponent(RuntimeTest.java:42)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at junit.framework.TestCase.runTest(TestCase.java:154)
    	at junit.framework.TestCase.runBare(TestCase.java:127)
    	at junit.framework.TestResult$1.protect(TestResult.java:106)
    	at junit.framework.TestResult.runProtected(TestResult.java:124)
    	at junit.framework.TestResult.run(TestResult.java:109)
    	at junit.framework.TestCase.run(TestCase.java:118)
    	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    	at junit.framework.TestSuite.run(TestSuite.java:203)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)



    can i get any assistance in this regard , as a document ...


    regards,
    siva

  2. #2
    gmoran Guest

    Default Re:Documentation for testing

    Hi Siva,

    You are on the right track - the startup of the platform can be found in the JUnit tests in the org.pentaho.test directory, which runs the platform engine as a standalone application instead of as a J2EE app.

    The platform will by default look for the Quartz database on startup to initialize it. The Quartz database is necessary for the scheduling functionality within the platform. So you must make sure that the Quartz database is up and running and can be found by the platform. This means that the appropriate JDBC driver needs to be on your classpath (if you are using the sample databases, this would be the hsqldb.jar that ships with the sample databases), and the database should be up and running when you try to initialize the platform.

    If you don't need the scheduler, you can disable the initialization by commenting out the following line in your pentaho.xml file, in the solutions/system directory:
    Code:
    <quartz>org.pentaho.scheduler.QuartzSystemListener</quartz>
    You will need to set the solutionPath on the constructor to the StandaloneApplicationContext (see the setUp() method in the BaseTest class, the class that ReportingTest descends from).

    Code:
    StandaloneApplicationContext applicationContext = new StandaloneApplicationContext(YOUR_SOLUTION_PATH, "" );
    Let me know if this helps - or if you need further clarification.
    best regards,
    Gretchen

  3. #3
    Join Date
    Jul 2006
    Posts
    3

    Default Re:Documentation for testing

    In case my experience will help someone, I began with this same error message on a Redhat Enterprise Linux 4 system with the Pre-Configured Installation. How I resolved my problem (this one, anyway

    1. cd to <pentaho-demo>/data
    2. execute ./start-hypersonic.sh
    3. verified that the four datasources all failed to open -- the error was
    org.hsqldb.HsqlException General Error java.lang.Error not implemented
    4. execute
    which java
    5. verified that the system's java command was not pointed to my jdk installation, but was going to a symbolic link in /usr/bin to a jre
    6. modified the system's symbolic links to point to my jdk (I'm not sure whether this will cause problems in other applications)
    7. re-execute ./start-hypersonic.sh
    8. now for me, all is well, I hope for you too!

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.