我正在尝试在 Wildfly 13 中部署使用 Webscoket 客户端作为消费者的 Camel Route。
当我尝试运行该项目时,出现以下错误:
Caused by: [java.lang.RuntimeException - Could not find an implementation class.]: java.lang.RuntimeException: Could not find an implementation class.
at javax.websocket.ContainerProvider.getWebSocketContainerImpl(ContainerProvider.java:89)
at javax.websocket.ContainerProvider.getWebSocketContainer(ContainerProvider.java:69)
我正在使用以下依赖项:
<dependency>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-standalone-client</artifactId>
<version>1.15</version>
</dependency>
在 Eclipse 上运行代码,一切正常。
我需要在 Wildfly 或项目中做一些特定的配置来运行这段代码吗?
我的 Maven 构建:
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathLayoutType>custom</classpathLayoutType>
<customClasspathLayout>META-INF</customClasspathLayout>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>