|
From: todd r. <to...@us...> - 2005-03-31 20:54:51
|
Update of /cvsroot/pocolap/pocolap/data/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/data/documentation Added Files: config_file_how_to.sxw How to setup logging.txt Creating the nss database.txt Creating the pocOLAPinternal database.txt Notes on using Oracle.txt config_file_how_to.pdf Log Message: Reorganization of resources --- NEW FILE: Notes on using Oracle.txt --- 1. Install pocOLAP ver 004, as described in the applied documentation. Install Oracle 9i with seed database (not scope of this doc to tell how, refer to Google :). Enable user sh. 2. Setup Oracle schema connection configuration a. Download the schema conf. file (shconfig.xml) b. newgrp <tomcat_grp>, alternatively: su <tomcat_usr> c. mkdir $TOMCAT_HOME/webapps/pocolap/WEB-INF/data d. cd $TOMCAT_HOME/webapps/pocolap/WEB-INF/data e. cp <download_loc>/shconfig.xml . f. vi shconfig.xml and set the "source" tag attributes and text: <source classtype="com.pocolap.conn.StandardJDBC" driver="oracle.jdbc.OracleDriver" user="sh" pass=<sh_psw> > jdbc:oracle:thin:@//your_host:ora_port/sid </source> Example source tag content is: jdbc:oracle:thin:@//localhost:1521/oradb1 2. Start Oracle 9i LISTENER should also be up, internal connection not enough. 3. Supply Oracle JDBC classes For JDK1.4: cp $ORACLE_HOME/jdbc/lib/ojdbc14.jar $POCO_HOME/lib For JDK 1.2.x or 1.3.x: cp $ORACLE_HOME/jdbc/lib/classes12.jar $POCO_HOME/lib 4. vi $POCOLAP_HOME/WEB-INF/web.xml Paste near other init-params: <init-param> <param-name>whs_z</param-name> <param-value>/WEB-INF/data/shconfig.xml</param-value> </init-param> 5. Start tomcat and try it: http://localhost:8080/pocolap/ReptPage.jsp Additional Notes (added for version 0.1.1): Because the Oracle drivers don't support the setCatalog() method, using the catalog attribute of the source tag can cause Exceptions. It is recommended that you use the StandardJDBCNoCatalog class with Oracle and setting the catalog through the dbstring. --- NEW FILE: Creating the nss database.txt --- The nss database is the original sample database for pocOLAP. It is an HSQLDB database. As of version 0.1.1 the sample database is located inside the pocOLAPinternal database implemented in Derby. To create the nss database, you need the following: HSQLDB (download from http://hsqldb.sourceforge.net/) pocohsqldb.jar setupNSS_hslqdb.sql -- Unzip the hsqldb.zip file you downloaded from sourceforge. Place hsqldb.jar (found in lib/ directory) whereever you want. This will be referred to as $HSQLDB_HOME from here on, though you don't need to set this as a variable unless you'd like to. -- Set and export your classpath to hsqldb.jar and pocohsqldb.jar (for example: export CLASSPATH=/opt/HSQLDB/hsqldb.jar;/opt/mystuff/pocohsqldb.jar). -- Switch to the directory where you want your data files to be placed. Run HSQLDB with "java org.hsqldb.util.DatabaseManager". When the "connect" box comes up, change "Type" to Standalone and place "nss" in the "URL" box, where "<<database?>>" is listed -- Copy (as in "copy and paste") the text from setupNSS_hsqldb.sql and paste it into the query box (in between the "Clear" and "Execute" buttons). DO NOT use setupNSS.sql since this was created for a different RDBMS. -- That's it! If you want to confirm the data is there, choose View->Refresh Tree. The files have been written to the directory where you issued the "java" command. Use them in good health! --- NEW FILE: config_file_how_to.pdf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: config_file_how_to.sxw --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Creating the pocOLAPinternal database.txt --- This document explains how to create the Derby based sample database manually. To build the sample database, you need: Derby (the derby.jar and derbytools.jar files, available for download from http://incubator.apache.org/derby/) pocohsqldb.jar (in the source tree at web/mcsDemo/tools) pocOLAPsample.sql (in the source tree at src/scripts) Install Derby on your system such that you can run the ij and dblook tools. You can find instructions with the Derby distribution. You can also run derby directly from the jar files, however these instructions assume you can run the derby tools directly. Set and export your classpath, for example (assuming you've copied all the jar files into the /tmp directory): > export CLASSPATH=$CLASSPATH:/tmp/derby.jar:/tmp/derbytools.jar:/tmp/pocohsqldb.jar Change to the directory where you want the database files to be written. Run the ij tool. Run the scripts, for example: run 'pocOLAPsample.sql';. That's it. The directory that contains the database files are located in the directory where you ran ij. You can confirm that the data was written correctly using either the ij or dblook tools. --- NEW FILE: How to setup logging.txt --- How to set up logging: Short Answer: In short, if you don't make any change, a log file name pocolaplog.txt will be placed in the pocOLAPinternal directory. See INSTALL.txt for information about setting up the internal database. If you'd like to change the logging settings, modify the log4j.properties file in the pocOLAPinternal directory. Changes made while the application is running will be reflected usually within a minute. Detailed Answer: (1) Make sure that log4j.properties file is located in the Derby Directory(Internal Database). For e.g.: C:\pocOLAPinternal\log4j.properties OR /tmp/pocOLAPinternal/log4j.properties If you place internal database at a different location, make sure that log4j.properties is also in that directory. Also don't forget to update "pocolap.DB.location" parameter in web.xml (2) By default the log file will be available in Derby Directory. If you want to log at different location, edit the log4j.properties. Change the value for "log4j.appender.R.File" property. Also, you may want to place an empty file at that location. Eg: log4j.appender.R.File=C:\xyz\mylogfile.txt (3) You can change the level of logging to DEBUG, INFO, WARN, ERROR or FATAL. Setting the level to DEBUG will capture all logging output, while INFO will capture informational messages and higher (no debug statements). Each level logs fewer and fewer messages. (4) You can set the level for a specific class by adding a line to log4j.properties, using "log4j.logger" plus the name of the class. For example, say you want every class in the com.pocolap.dbagent package set to WARN, except for com.pocolap.dbagent.QueryGenerator, which you want to set to DEBUG. We would simply use the following "log4j.logger" statements in the log4j.properties file: log4j.logger.com.pocolap.dbagent=WARN log4j.logger.com.pocolap.dbagent.QueryGenerator=DEBUG |