无法为oracle aq配置jndi.properties flume

zwghvu4y  于 2021-06-04  发布在  Flume
关注(0)|答案(1)|浏览(505)

我想把我的 Apache Flume 应用程序源到 Oracle AQ . jndi.properties 在类路径中,配置如下:

java.naming.factory.initial=oracle.jms.AQjmsInitialContextFactory
java.naming.provider.url=tcp://my.db.url
java.naming.security.principal=remote
java.naming.security.credentials=remotepwd

日志中出现以下错误:

Source jmsSource has been removed due to an error during configuration
org.apache.flume.FlumeException: Could not create initial context oracle.jms.AQjmsInitialContextFactory provider tcp://my.db.url
....
Caused by: javax.naming.NamingException: The configuration of the AQjmsInitialContext is not complete.
The configuration must contain datasource or (db_url,java.naming.security.principal,java.naming.security.credentials) or both

我复制了
java.naming.security.principal=remote java.naming.security.credentials=remotepwd 从一个例子,我真的不知道什么是我需要插入的值。
关于如何配置 jndi.properties 文件正确吗?

jc3wubiy

jc3wubiy1#

根据错误消息(在查看源代码之前我也不清楚),db url是通过 db_url 财产。所以你想要像 java.naming.factory.initial=oracle.jms.AQjmsInitialContextFactory db_url=tcp://my.db.url java.naming.security.principal=remote java.naming.security.credentials=remotepwd

相关问题