Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for camel-kafka #732

Closed
EgonPedersen opened this issue Jul 6, 2015 · 2 comments
Closed

Add support for camel-kafka #732

EgonPedersen opened this issue Jul 6, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@EgonPedersen
Copy link

Hi,

I am not sure if this is the right place.

But i really need kafka http://kafka.apache.org/ support for this project.

I tried adding it manually as desribed in the tutorials, but it required alot of dependencies to work. Havent made it work yet.

@tdiesler tdiesler added this to the 3.0.0 milestone Jul 7, 2015
@tdiesler tdiesler self-assigned this Jul 7, 2015
@tdiesler
Copy link
Contributor

tdiesler commented Jul 7, 2015

I'll take a look

@tdiesler tdiesler changed the title Add support for kafka Add support for camel-kafka Jul 7, 2015
@EgonPedersen
Copy link
Author

Thank you for the effort put into it Thomas:)

I tried it out, but it is giving the below error upon server startup.

I did the following:

  1. Installed the newest wildfly 9.0.0.final release
  2. Build the latest source code of camel-kafka
  3. Installed it into the wildfly server.
  4. Started the server.
  5. Deployed my project, which contains nothing else than this camel-context.xml

camel-context:

"<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
    <camel:camelContext trace="false" xmlns="http://camel.apache.org/schema/spring">
        <route id="test">
            <from uri="kafka:dkclusters02:9092?topic=test-rep-three&amp;zookeeperHost=10.39.65.121&amp;zookeeperPort=2181&amp;groupId=1" />
            <to uri="myBean" />
        </route>            
    </camel:camelContext>   
    <bean id="myBean" class="our.package.WriterCamel"/> 
</beans>"


Error:

08:20:25,824 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."projectname-kafka-spark-ear-1.0-SNAPSHOT.ear".POST_MODULE: org.jboss.msc.service.StartException in service jboss.depl
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: javax/management/ObjectName
        at kafka.utils.Utils$.registerMBean(Utils.scala:260)
        at kafka.utils.Log4jController$.<init>(Log4jController.scala:29)
        at kafka.utils.Log4jController$.<clinit>(Log4jController.scala)
        at kafka.utils.Logging$class.$init$(Logging.scala:29)
        at kafka.utils.VerifiableProperties.<init>(VerifiableProperties.scala:26)
        at kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:94)
        at org.apache.camel.component.kafka.KafkaConsumer.doStart(KafkaConsumer.java:79)
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869)
        at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3163)
        at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3099)
        at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3029)
        at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797)
        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653)
        at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
        at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)
        at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)
        at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)
        at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)
        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)
        at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
        at org.wildfly.extension.camel.SpringCamelContextFactory.createSpringCamelContext(SpringCamelContextFactory.java:99)
        at org.wildfly.extension.camel.SpringCamelContextFactory.createSpringCamelContext(SpringCamelContextFactory.java:60)
        at org.wildfly.extension.camel.deployment.CamelContextCreateProcessor.deploy(CamelContextCreateProcessor.java:83)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
        ... 5 more
Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName from [Module "org.apache.kafka:main" from local module loader @7f7052 (finder: local module finder @1028347 (roots: D:\servers\wildfly-camel\wildfly-9.0.0.Final\modules,D:\se
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
        ... 38 more

08:20:25,967 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-3) WFLYCTL0013: Operation ("add") failed - address: ([{"deployment" => "projectname-kafka-spark-ear-1.0-SNAPSHOT.ear"}]) - failure description: {"WFLYCTL0080: Failed ser
    Caused by: java.lang.NoClassDefFoundError: javax/management/ObjectName
    Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName from [Module \"org.apache.kafka:main\" from local module loader @7f7052 (finder: local module finder @1028347 (roots: D:\\servers\\wildfly-camel\\wildfly-9.0.0.Final\\mod
08:20:25,977 ERROR [org.jboss.as.server] (XNIO-1 task-3) WFLYSRV0021: Deploy of deployment "projectname-kafka-spark-ear-1.0-SNAPSHOT.ear" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"projectname-kafka-spark-ear-1.0-SNAPSHOT.ear\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"projectname-kafka-spark-ear-1.0-SNAPSHOT.ear\".POST_
    Caused by: java.lang.NoClassDefFoundError: javax/management/ObjectName
    Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName from [Module \"org.apache.kafka:main\" from local module loader @7f7052 (finder: local module finder @1028347 (roots: D:\\servers\\wildfly-camel\\wildfly-9.0.0.Final\\mod
08:20:25,985 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0208: Stopped subdeployment (runtime-name: projectname-kafka-spark-ejb-1.0-SNAPSHOT.jar) in 8ms
08:20:26,046 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment projectname-kafka-spark-ear-1.0-SNAPSHOT.ear (runtime-name: projectname-kafka-spark-ear-1.0-SNAPSHOT.ear) in 69ms
08:20:26,048 INFO  [org.jboss.as.controller] (XNIO-1 task-3) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."projectname-kafka-spark-ear-1.0-SNAPSHOT.ear".POST_MODULE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants