无法自动创建组件:restlet

如何解决无法自动创建组件:restlet

我是 Fuse 世界的初学者,有些问题我无法解决,希望有人能帮助我。

我开发了 Redhate CodeRedy IDE 的 Fuse 项目(独立 - 在 EAP 和 spring Bean 上熔断 - spring DSL),这是我的 Camel 上下文 xml

1- jboss-camel-context.xml

    <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="        http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd        http://camel.apache.org/schema/spring https://camel.apache.org/schema/spring/camel-spring.xsd">
    <bean
        class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer" id="bridgePropertyPlaceholder">
        <property name="location" value="classpath:/properties/properties.properties"/>
    </bean>
    <camelContext id="spring-context" xmlns="http://camel.apache.org/schema/spring">
        <route id="_route1">
            <from id="_from1" uri="restlet:http://{{http.host}}:{{http.port}}/test"/>
            <log id="_log1" message="Hello"/>
        </route>
    </camelContext>
</beans>

2- pom.xml

    <?xml version="1.0" encoding="UTF-8"?
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany</groupId>
  <artifactId>camel-test-spring</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <name>Fuse on EAP Camel Spring Application</name>
  <description>Fuse on EAP Camel Example using Spring</description>
  <properties>
    <version.jboss.arquillian>1.1.10.Final</version.jboss.arquillian>
    <maven.compiler.source>1.8</maven.compiler.source>
    <version.wildfly.arquillian>2.1.0.Final</version.wildfly.arquillian>
    <server.config>standalone-camel.xml</server.config>
    <version.maven.war.plugin>3.0.0</version.maven.war.plugin>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <version.wildfly.maven.plugin>1.2.0.Final</version.wildfly.maven.plugin>
    <maven.compiler.target>1.8</maven.compiler.target>
    <version.wildfly>7.1.0.GA-redhat-11</version.wildfly>
    <version.maven.surefire.plugin>2.20.1</version.maven.surefire.plugin>
    <jboss.home>${env.JBOSS_HOME}</jboss.home>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.maven.compiler.plugin>3.8.0</version.maven.compiler.plugin>
    <fuse.version>7.8.0.fuse-sb2-780038-redhat-00001</fuse.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jboss.redhat-fuse</groupId>
        <artifactId>fuse-eap-bom</artifactId>
        <version>7.8.0.fuse-sb2-780038-redhat-00001</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
      <version>2.23.2.fuse-780036-redhat-00001</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_3.1_spec</artifactId>
      <version>1.0.0.Final-redhat-1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-restlet</artifactId>
      <version>2.23.2.fuse-780036-redhat-00001</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <repositories>
  <repository>
    <id>maven.restlet.org</id>
    <name>maven.restlet.org</name>
    <url>http://maven.restlet.org</url>
  </repository>
    <repository>
      <id>jboss-public-repository</id>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    </repository>
    <repository>
      <id>red-hat-ga-repository</id>
      <url>https://maven.repository.redhat.com/ga</url>
    </repository>
  </repositories>
  <build>
    <testResources>
      <testResource>
        <filtering>true</filtering>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.maven.compiler.plugin}</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>${version.maven.war.plugin}</version>
      </plugin>
      <plugin>
        <groupId>org.wildfly.plugins</groupId>
        <artifactId>wildfly-maven-plugin</artifactId>
        <version>${version.wildfly.maven.plugin}</version>
        <configuration>
          <version>${version.wildfly}</version>
          <serverConfig>${server.config}</serverConfig>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.maven.surefire.plugin}</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>arq-managed</id>
      <dependencies>
      <dependency>
  <groupId>org.restlet.jse</groupId>
  <artifactId>org.restlet</artifactId>
  <version>2.2-RC4</version>
</dependency>
<dependency>
  <groupId>org.restlet.jse</groupId>
  <artifactId>org.restlet.ext.simple</artifactId>
  <version>2.2-RC4</version>
</dependency>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-managed</artifactId>
          <version>${version.wildfly.arquillian}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>arq-remote</id>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-remote</artifactId>
          <version>${version.wildfly.arquillian}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jdk9+-build</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <version>1.3.1</version>
        </dependency>
        <dependency>
          <groupId>javax.xml.ws</groupId>
          <artifactId>jaxws-api</artifactId>
          <version>2.3.0</version>
          <exclusions>
            <exclusion>
              <artifactId>jaxb-api</artifactId>
              <groupId>javax.xml.bind</groupId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>jakarta.xml.bind</groupId>
          <artifactId>jakarta.xml.bind-api</artifactId>
          <version>2.3.2.redhat-00001</version>
        </dependency>
        <dependency>
          <groupId>com.sun.activation</groupId>
          <artifactId>javax.activation</artifactId>
          <version>1.2.0</version>
        </dependency>
        <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
          <version>1.1.3</version>
        </dependency>
        <dependency>
          <groupId>com.sun.xml.messaging.saaj</groupId>
          <artifactId>saaj-impl</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jta_1.1_spec</artifactId>
        </dependency>
        <dependency>
          <groupId>org.jboss.spec.javax.rmi</groupId>
          <artifactId>jboss-rmi-api_1.0_spec</artifactId>
          <version>1.0.5.Final-redhat-1</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jdk12+-build</id>
      <activation>
        <jdk>[12,)</jdk>
      </activation>
      <properties>
        <version.maven.war.plugin>3.2.2</version.maven.war.plugin>
      </properties>
    </profile>
  </profiles>
</project>

现在我尝试在 EAP Fuse 服务器上部署此集成项目,但存在以下问题

{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"LearningProject.war\".CamelContextActivationService.\"LearningProject.war\"" => "Cannot create camel context: LearningProject.war
Caused by: org.jboss.msc.service.StartException in anonymous service: Cannot start camel context: spring-context
Caused by: org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route _route1: Route(_route1)[[From[restlet:http://{{http.host}}:{{http.por... because of Failed to resolve endpoint: restlet://http://localhost:8080/test due to: Cannot auto create component: restlet
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route _route1: Route(_route1)[[From[restlet:http://{{http.host}}:{{http.por... because of Failed to resolve endpoint: restlet://http://localhost:8080/test due to: Cannot auto create component: restlet
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: restlet://http://localhost:8080/test due to: Cannot auto create component: restlet
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: restlet
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: restlet
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.camel.component.restlet.RestletComponent': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.camel.component.restlet.RestletComponent]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.camel.component.restlet.RestletComponent]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler
Caused by: java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler
Caused by: java.lang.ClassNotFoundException: com.sun.net.httpserver.HttpHandler from [Module \"deployment.LearningProject.war\" from Service Module Loader]"}}

我该如何解决这个问题???

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-