Skip to content

Creating capped collection with CollectionOptions.empty().capped(…) causes NPE [DATAMONGO-1687] #2600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue May 7, 2017 · 1 comment
Assignees
Labels
in: core Issues in core support type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link

Mark Paluch opened DATAMONGO-1687 and commented

NPE is thrown when attempting to create a collection without collation

Code

blockingMongo.createCollection(LoginEvent.class, CollectionOptions.empty().capped(10000));

Stack trace

java.lang.NullPointerException
	at org.springframework.data.mongodb.core.MongoTemplate.convertToDocument(MongoTemplate.java:1964)
	at org.springframework.data.mongodb.core.MongoTemplate.createCollection(MongoTemplate.java:477)
	at org.springframework.data.mongodb.core.MongoTemplate.createCollection(MongoTemplate.java:468)

Affects: 2.0 M2 (Kay)

Issue Links:

Referenced from: pull request #462

@spring-projects-issues
Copy link
Author

Mark Paluch commented

ReactiveMongoTemplate does not consider collation when creating a collection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants