PDA

View Full Version : successful install of example system on Tomcat 5.5



jnicho02
03-15-2006, 02:44 AM
Hi,

Just got the examples up-and-running on tomcat 5.5. By following the Pentaho_Advanced_Install_Guide_1.0.0.0.pdf it was generally plain sailing. The definition of jndi data sources has changed slightly from tomcat 5.0 to 5.5 (see http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html), the parameters are as attributes. Personally I prefer to put my apps somewhere other than under webapps so have used a context, snippet is:





[Resource name="jdbc/SampleData" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/sampledata" /]
[Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"
maxWait="10000" username="hibuser" password="password"
driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost/hibernate" /]
[Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"
maxWait="10000" username="pentaho_user" password="password"
driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost/quartz" /]
[Resource name="jdbc/Shark" auth="Container" type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"
maxWait="10000" username="sa" password="" driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/shark" /]




(sorry...square brackets for gt and lt signs as I can't seem to post with them in)

Oh, and technically the hsqldb.jar doesn't necessarily go in the %TOMCAT_HOME%/common/endorsed directory, more often it would be in %TOMCAT_HOME%/common/lib.

...maybe the guide could have a small update.

I will likely be installing on JRun soon, so will post any problems/solutions.

Jez

Post edited by: jnicho02, at: 03/15/2006 07:03

bpfonte
03-15-2006, 03:45 AM
Hi Jez,

Great post! Thanks for the info.

Until now I just tried Pentaho with the JBoss included in the demo. It's working and, with little trouble, I can deploy it in any machine I want.

But your message got me thinking... As I have little experience with java application servers I'm wondering what are the main differences, in what Pentaho is concerned, between using JBoss, Tomcat or any other? Wich one is, in your opinion, best for a production implementation of Pentaho and why?

Many thanks,
Bruno

jnicho02
03-16-2006, 02:16 AM
I would argue that a full J2EE server such as JBoss is overkill when all you are using are servlets and jsp.

Tomcat would be my first choice as it is easy to install, needs little configuration, and is very mature and stable.

I have to use JRun as I use a (dedicated) hosted web server. ISPs normally offer either Tomcat or JRun. If its the latter then thats because different instances run in their own memory space and one customer's app can't bring down all the rest.

Technically you could deploy to a shared hosted web server, but you might have trouble getting permission to set up the jndi.

Supporting deployment configurations for multiple servlet engines can be awkward, but it does make the system more useable. Systems such as Matt Raible's AppFuse include an ant task like 'setup-tomcat' which copies the jdbc drivers, etc. to the server so that users have fewer manual steps to follow.

bpfonte
03-16-2006, 02:31 AM
Now I really got to try deploying Pentaho on Tomcat!... One more question: what do you have to say about performance in what Pentaho is concerned?

--
Bruno

jnicho02
03-16-2006, 06:43 AM
If you mean the performance of Pentaho in different servlet engines then I couldn't really say, as I haven't used it much yet, but I would think that bottlenecks would more be in your choice of database server and design of your database than the creation of the reports themselves.

adeshazor
03-16-2006, 06:48 AM
Thanks for the validation. Are there other areas of improvement you can suggest for the advance install guide?

Anthony

jcorn
03-16-2006, 07:31 AM
Jez, thanks for this info!

I used the newer Install Guide, v1.1.1, which has configuration info specific to Tomcat 5.5, but it differs slightly from yours...

I was able to get up and running with it, but I can't get a few of the samples to work. Can you verify whether or not you can execute the following:

a) 1. Getting Started > 3. Sample Data
--this one is giving me “Error: ConnectFactory.ERROR_0001 - Database connection could not be established to: SampleData (org.pentaho.component.SQLLookupRule)???

b) 2. Reporting Examples > JFree XQuery Report
--this gives "Error: JFreeReport.ERROR_0007 - Could not parse report /usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/pentaho-solutions/samples/reporting/JFreeQuadForRegion.xml (org.pentaho.jfree.JFreeReportComponent)"

Thanks again!

Jared

jnicho02
03-20-2006, 09:17 AM
1st thing is: you must be running the hypersonic databases (pentaho-data/start_hypersonic.bat) before you start Tomcat.

SampleData is one of the jndi datasources that needs to be set up in server.xml. It can either be in GlobalNamingResources or an individual context. The former is in the guide and is probably easiest to implement.

You can list your jndi resources in the tomcat manager....assuming you remember what you set the admin password to when you installed...

http://localhost:8080/manager/resources

should list something like....



OK - Listed global resources of all types
UserDatabase:org.apache.catalina.users.MemoryUserDatabase
jdbc/SampleData:org.apache.naming.ResourceRef
jdbc/Quartz:org.apache.naming.ResourceRef
jdbc/Hibernate:org.apache.naming.ResourceRef
jdbc/Shark:org.apache.naming.ResourceRef