pentahopentaho-report-designer

Invalid data source error (oracle) in Pentaho 8.0


I'm trying to make a multi-tenancy application. I've followed this tutorial, and also this one. So, what I have in context.xml is:

    <Resource
    name="jdbc/DB-xxx"
    auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.commons.dbcp.BasicDataSourceFactory"
    maxActive="20"
    maxIdle="5"
    maxWaitMillis="10000"
    username="xxx"
    password="pass"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@//xxxurl:1521:ORCL"
/>
<Resource
    name="jdbc/DB-aaa"
    auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.commons.dbcp.BasicDataSourceFactory"
    maxActive="20"
    maxIdle="5"
    maxWaitMillis="10000"
    username="aaa"
    password="pass"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@//aaaurl:1521:ORCL"
/>

I also have the JNDI pointing to those above in defaut.properties and jdbc.properties.

When I try to connect to the JNDI using the Pentaho Report Design, I receive these erros:

Error connecting to database [DB] :org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database

javax.naming.NamingException: Invalid data source:'DB'
Invalid data source:'DB'


org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database

javax.naming.NamingException: Invalid data source:'DB'
Invalid data source:'DB'

I have the ojdbc6 in all libs, so I think that this is not the problem. Does someone have any idea?

Thanks!


Solution

  • Ok, I've found the solution. I was changing the code in the wrong directory. The right one is C:\Users\user\.pentaho\simple-jndi. I've put, in the default file, the database infos and it worked. Now I'm able to connect to the database.