Camel example can#39;t find org.apache.camel.impl.DefaultComponent(骆驼示例找不到 org.apache.camel.impl.DefaultComponent)
问题描述
我创建了一个小的 Apache Camel 示例,但它找不到类 org.apache.camel.impl.DefaultComponent.
老实说,这对我来说似乎是一个错误,或者与 core-zeromq 不兼容.
I've created a small Apache Camel example, but it can't find the class org.apache.camel.impl.DefaultComponent. Here the full error log.
I've looked the class up on search.maven.org, which says it should be contained in org.apache.camel:camel-core. Adding it does not solve my problem.
What's wrong in this example?
This is the application
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setWebApplicationType(WebApplicationType.NONE);
app.run(args);
}
}
and here the route.
@Component
public class ZmqRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
//from("stream:in").to("stream:out");
String host = "zmq.devnet.iota.org";
from("zeromq:tcp://" + host + ":5556?socketType=SUBSCRIBE&topics=tx")
.to("stream:out")
.log("${body}");
}
}
Lastly, here the build.gradle.kts
plugins {
java
application
id("org.springframework.boot") version "2.1.2.RELEASE"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
}
repositories {
jcenter()
}
application {
mainClassName = "org.example.camel.Application"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.addAll(arrayOf("-Xlint:all"))
options.encoding = "UTF-8"
}
dependencies {
val camelVersion = "3.0.0-M1"
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.apache.camel:camel-spring-boot-starter:$camelVersion")
implementation("org.apache.camel:camel-stream-starter:$camelVersion")
//implementation("org.apache.camel:camel-core:$camelVersion")
implementation("org.apache-extras.camel-extra:camel-zeromq:2.22.0") {
exclude(module = "zeromq-scala-binding_2.10")
}
implementation("org.zeromq:jeromq:0.5.0")
testImplementation("junit:junit:4.12")
}
So basically, after looking at Camel Core 3.0.0.M1, I discovered the .class file for
org.apache.camel.impl.DefaultComponent
doesn't exists anymore!
camel-core-3.0.0-M1.jarorgapachecamelimpl
Honestly it seems like a bug to me, or incompatibility with core-zeromq.
这篇关于骆驼示例找不到 org.apache.camel.impl.DefaultComponent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:骆驼示例找不到 org.apache.camel.impl.DefaultComponent
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
