Search code examples
javaapache-kafkaibm-cloudmessage-hub

Error in streaming-analytic service in Bluemix


I followed this tutorial to use the streaming-analytic service in Bluemix to interface with message-hub: https://developer.ibm.com/bluemix/2015/10/16/streaming-analytics-message-hub-2/?cm_mc_uid=45284031179414585919178&cm_mc_sid_50200000=1464112496

I am getting an error:

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

Thanks


Solution

  • Regarding the error, it seems that you are missing following class: com.ibm.messagehub.login.MessageHubLoginModule.

    Check this step from tutorial:

    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

    According to this you can check if messagehub.login-1.0.0.jar is included in your .sab file:

    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

    If it is missing, add it in /lib folder.