[英]Unsatisfied dependencies for class at injection point. Reference not found com.datastax.driver.core.Cluster
I am working JavaEE and Cassandra DB with wildfly server.我正在使用 Wildfly 服务器使用 JavaEE 和 Cassandra DB。 wildfly server is unable to deploy .war with the following error log:
wildfly 服务器无法部署 .war 并显示以下错误日志:
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type CassandraConnector with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject com.MyMainClass.CC
at com.MyMainClass.CC(MyMainClass.java:0)
WELD-001474: Class com.cassandra.CassandraConnector is on the classpath, but was ignored because a class it references was not found: com.datastax.driver.core.Cluster from [Module "deployment.Services-0.0.1.war:main" from Service Module Loader].
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Basically I am unable to identify the problematic point let alone the solution.基本上我无法确定问题点,更不用说解决方案了。 Is this because the wildfly server is unable to connect with Cassandra DB running on the System?
这是因为wildfly 服务器无法连接到系统上运行的Cassandra DB 吗? Or the problem lies somewhere else?
还是问题出在其他地方? If the server configuration is the issue, what is the correct solution for that?
如果服务器配置是问题,那么正确的解决方案是什么? I have tried many except Cassandra JDBC (not even sure if that works).
除了 Cassandra JDBC(甚至不确定它是否有效)之外,我已经尝试了很多。 Just to clarify, all dependencies are added into the project.
只是为了澄清,所有依赖项都添加到项目中。
You need to add the dependency that provides com.datastax.driver.core.Cluster
- it's in the driver-core package that you can include via Maven, or other build system.您需要添加提供
com.datastax.driver.core.Cluster
的依赖com.datastax.driver.core.Cluster
- 它位于可以通过 Maven 或其他构建系统包含的driver-core 包中。
PS Don't forget to include its dependencies as well... PS不要忘记包括它的依赖项......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.