Thursday 26 June 2014

Define JNDI For Pentaho BA Server 5.0



Hello Guys,
In this post i would like to explain How to Define JNDI For Pentaho BA Server 5.0

Add Driver :

Place appropriate driver for Sql Server 8 and 12  which is jtds-1.3.0.jar to this directory for the BA Server: /pentaho/server/biserver-ee/tomcat/lib/.

1)  Stop server  & BA server.

2) Edit the /tomcat/webapps/pentaho/WEB-INF/web.xml file.
<!-- insert additional listeners -->
<resource-ref>
    <description>Database_name</description>
    <res-ref-name>jdbc/Connection_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

3) Open & Modify this file biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties.
Add this line at bottom and change sqltest to database name.

Connection_name/type=javax.sql.DataSource
Connection_name/driver=net.sourceforge.jtds.jdbc.Driver
Connection_name/url=jdbc:jtds:sqlserver://sqltest:1433/Database_name
Connection_name/user=root
Connection_name/password=password


4)Open & modify this file /tomcat/webapps/pentaho/META-INF/context.xml.
<!-- The contents of this file will be loaded for each web application -->

<Resource name="jdbc/Connection_name"
    auth="Container" type="javax.sql.DataSource"
    factory="org.apache.commons.dbcp.BasicDataSourceFactory"
    maxActive="20"
    maxIdle="5"
    maxWait="10000"
    username="root"
    password="password"
    driverClassName="net.sourceforge.jtds.jdbc.Driver"
    url="jdbc:jtds:sqlserver://sqltest:1433/Database_name"
/>


5) Delete the pentaho.xml filed located in the /tomcat/conf/catalina/directory.


6) Start tomcat and BA Server
 

Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal
BI Developer
"The beautiful thing about learning is nobody can take it away from you."


 


No comments :

Post a Comment