Skip to content

MappingMongoConverter cannot be proxied because it implements the package-private ValueResolver interface [DATAMONGO-2079] #2945

@spring-projects-issues

Description

@spring-projects-issues

Ilya Ivahnenko opened DATAMONGO-2079 and commented

Below code solves the Mongo keys '.' and '$' escaping issue.

 

public class MongoKeysEscapingConfig extends MappingMongoConverter { @Override protected String potentiallyEscapeMapKey(String source) {...} @Override protected String potentiallyUnescapeMapKey(String source) {...} }

 

When try to Start application, the following exception raises:

Caused by: java.lang.IllegalAccessError: class org.springframework.data.mongodb.core.convert.$Proxy156 cannot access its superinterface org.springframework.data.mongodb.core.convert.ValueResolver

 

The root cause related to ``ValueResolver access level(``package private``). Impossible to start application without class path file propagation in IDE. If starting from jar, it works fine.

 

Proposed way to fix - do interface ``ValueResolver as package public.


Affects: 2.0.9 (Kay SR9)

Reference URL: https://jira.spring.io/browse/DATAMONGO-380

Attachments:

Referenced from: pull request #832

Backported to: 2.2.5 (Moore SR5), 2.1.16 (Lovelace SR16)

2 votes, 3 watchers

Metadata

Metadata

Assignees

Labels

in: mappingMapping and conversion infrastructuretype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions