Set up proper JNDI settings to run Mifos BI report in Mifos

Description

Pentaho uses JNDI to run. JNDI settings will need to be tweaked to run properly in the Jetty web container. Keith W has successfully run it with TomCat 7 for Mifos X.

See: http://sync.in/TmntootfiZ

Environment

None

Activity

Show:
johnwoodlock
April 12, 2012, 6:09 AM

If its any help, for Tomcat 7, for mifos individual lending work (mifos x / mifos ng / whatever else it might be known as ) Keith W added the following jndi items for a pentaho reports demo at <GlobalNamingResources> section in file server.xml

<Resource type="javax.sql.DataSource"
name="jdbc/SourceDB"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/mifos_test"
username="root"
password="mysql"
initialSize="3"
maxActive="20"
maxIdle="15"
minIdle="3"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
logAbandoned="true"
suspectTimeout="60"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;ResetAbandonedTimer" />

<Resource type="javax.sql.DataSource"
name="jdbc/DestinationDB"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/mifos_test_dwh"
username="root"
password="mysql"
initialSize="3"
maxActive="20"
maxIdle="15"
minIdle="3"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
logAbandoned="true"
suspectTimeout="60"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;ResetAbandonedTimer" />

Also, in src/main/webapp/META-INF/context.xml looked like this (first line with mifosng in it not relevant for mifos bi reporting):

<?xml version="1.0" encoding="UTF-8"?>
<Context>
<ResourceLink name="jdbc/mifosng" global="jdbc/mifosng" type="javax.sql.DataSource" />
<ResourceLink name="jdbc/SourceDB" global="jdbc/SourceDB" type="javax.sql.DataSource" />
<ResourceLink name="jdbc/DestinationDB" global="jdbc/DestinationDB" type="javax.sql.DataSource" />
</Context>

Paweł Gesek
April 13, 2012, 2:32 PM
Edited

I have set up JNDI for Pentaho in commit f0ed884c4562cf50435982a2e7d462d564acddb2. I enabled JNDI in the workspace server, so when running mifos from Eclipse, JNDI is enabled. In order to enable JNDI in a standalone server however, a few extra steps have to be taken. See attachment for instructions. It would be good to document this somewhere, once we have full Pentaho support.

Lukasz Chudy
June 13, 2012, 11:24 AM
Edited

Verified on 13.06.2012
JNDI for Pentaho has been properly set up and reports are properly working under Mifos.

Build Date: Tue Jun 12 02:13:03 PDT 2012
Build Number: hudson-head-i-release-archive-3

Assignee

Paweł Gesek

Reporter

Ed Cable

Implementation Priority

None

URL

None

Team

Core

Scheduled For

None

productboard URL

None

Man Day Estimate

None

Time tracking

0m

Time remaining

10h

Components

Fix versions

Priority

Minor
Configure