@Resource(name = "java:global/MongoClient")
private MongoClient mongoClient;
java.lang.IllegalArgumentException: Can not set com.mongodb.MongoClient field [...] to com.mongodb.MongoClient
java.lang.ClassCastException: com.mongodb.MongoClient cannot be cast to com.mongodb.MongoClient
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/b9d57c56-481b-40e0-8f3e-250804277007%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
java.lang.IllegalArgumentException: Can not set com.mongodb.MongoClient field [...] to com.mongodb.MongoClient
MongoClientFactory
, that returns MongoClient
instances based on a
connection string.)<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<filtering>true</filtering>
<filters />
<archive>
<manifestEntries>
<Dependencies>org.mongodb,org.slf4j</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
@Resource(name = "java:global/MongoClient")
private MongoClient mongoClient;