java - Bluemix 中的流分析服务出错

标签 java apache-kafka ibm-cloud message-hub

我按照本教程使用 Bluemix 中的流分析服务与消息中心进行交互:https://developer.ibm.com/bluemix/2015/10/16/streaming-analytics-message-hub-2/?cm_mc_uid=45284031179414585919178&cm_mc_sid_50200000=1464112496

我收到一个错误:

Caused by: org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: unable to find LoginModule class: com.ibm.messagehub.login.MessageHubLoginModule

谢谢

最佳答案

关于错误,您似乎缺少以下类:com.ibm.messagehub.login.MessageHubLoginModule

从教程中检查此步骤:

First add the following jars to the opt/downloaded directory of the messaging toolkit.

  • jackson-core-2.5.4.jar
  • messagehub.login-1.0.0.jar

根据 this您可以检查 messagehub.login-1.0.0.jar 是否包含在您的 .sab 文件中:

To help application and toolkit developers understand which files are included in an application bundle file, you can use the spl-app-info command. For example, the following command lists the toolkits included in the bundle, and the files within those toolkits that are included in the bundle.

spl-app-info output/MyApp.sab --files

如果缺少,请将其添加到/lib 文件夹中。

关于java - Bluemix 中的流分析服务出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37421316/

相关文章:

java - 以编程方式检查节电模式

java - Kafka - 生产者批处理数

python - 在本地设置 Bluemix VCAP_SERVICES 环境变量以便我可以在本地进行开发?

java - 为什么 Bluemix dashDB 操作会抛出 SQLCODE=-1667 的 SqlSyntaxErrorException?

java - Gradle:使用项目类路径执行 Groovy 交互式 shell

java - AtomicInteger 增量未按预期运行

java - 如何更新我的 JRE?

java - KafkaConsumer assignment() 返回空

apache-kafka - Kafka Streams - 淹没kafka日志

ibm-cloud - 如何删除我的 bluemix 帐户 ID?