Pentaho 8.0 中的无效数据源错误(oracle)
Invalid data source error (oracle) in Pentaho 8.0
我正在尝试创建一个多租户应用程序。我关注了 tutorial, and also this one。所以,我在 context.xml
中的内容是:
<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"
/>
我也有 JNDI 指向上面 defaut.properties
和 jdbc.properties
中的那些。
当我尝试使用 Pentaho Report Design 连接到 JNDI 时,我收到以下错误:
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'
我在所有库中都有 ojdbc6,所以我认为这不是问题所在。有人知道吗?
谢谢!
好的,我找到了解决方案。我正在更改错误目录中的代码。右边的是C:\Users\user\.pentaho\simple-jndi
。我已经在 default
文件中放入了数据库信息并且它起作用了。现在我可以连接到数据库了。
我正在尝试创建一个多租户应用程序。我关注了 context.xml
中的内容是:
<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"
/>
我也有 JNDI 指向上面 defaut.properties
和 jdbc.properties
中的那些。
当我尝试使用 Pentaho Report Design 连接到 JNDI 时,我收到以下错误:
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'
我在所有库中都有 ojdbc6,所以我认为这不是问题所在。有人知道吗?
谢谢!
好的,我找到了解决方案。我正在更改错误目录中的代码。右边的是C:\Users\user\.pentaho\simple-jndi
。我已经在 default
文件中放入了数据库信息并且它起作用了。现在我可以连接到数据库了。