question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Translation of URI segments and request parameters into aggregates broken [DATACMNS-1743]

See original GitHub issue

Craig opened DATACMNS-1743 and commented

I have a controller class (annotated with @RepositoryRestController) with this method:

@ResponseBody
 @RequestMapping(method=RequestMethod.GET,value="/domainWords/search/findByDomainSetWithLocale")
 public CollectionModel<EntityModel<DomainWord>> findByDomainSetAndLocale(final @NonNull @RequestParam("domainSet") DomainSet domainSet, final @NonNull @RequestParam("locale") Locale locale)

DomainSet’s repository is:

@Repository
public interface DomainSetRepository extends org.springframework.data.repository.Repository<DomainSet, Long>

The test is to request

/api/domainWords/search/findByDomainSetWithLocale?domainSet=1&locale=es_ES

With Spring Data Neumann RELEASE, that works great.

With Spring Data Neumann SR1, it fails.

With Spring Data Neumann SR1 forcing spring-data-commons to version 2.3.0.RELEASE, it fails.

Therefore, this issue is a regression in spring-data-commons 2.3.1.RELEASE. So the problem is caused somewhere in this commit range: https://github.com/spring-projects/spring-data-commons/compare/2.3.0.RELEASE...2.3.1.RELEASE

When it fails, here’s the error:

Resolved [org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.isobar.mindsight.domain.DomainSet'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.isobar.mindsight.domain.DomainSet': no matching editors or conversion strategy found]

Affects: 2.2.8 (Moore SR8), 2.3.1 (Neumann SR1)

Issue Links:

  • DATACMNS-1734 Delay Repositories initialization in DomainClassConverter

Backported to: 2.3.2 (Neumann SR2), 2.2.9 (Moore SR9)

2 votes, 9 watchers

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
spring-projects-issuescommented, Dec 30, 2020

yukihane commented

Hi. Here is my testcase.

mvn clean test’ result:

Spring Boot Version Test Result
2.1.14 pass
2.1.15 fail
2.1.16 fail
2.2.7 pass
2.2.8 fail
2.2.9 pass
2.3.0 pass
2.3.1 fail
2.3.2 pass

It seems that this issue also affects version 2.1.x and has not been fixed

0reactions
spring-projects-issuescommented, Dec 30, 2020

derTobsch commented

Totally forgot how you can see it. If you start the application and try to request an application for leave it will break

Read more comments on GitHub >

github_iconTop Results From Across the Web

Domain types in Spring MVC controller method signatures not ...
... Translation of URI segments and request parameters into aggregates broken This bug affects Spring Boot version 2.3.1, 2.2.8 and 2.1.15.
Read more >
Changelog - Spring
DATACMNS-1743 - Translation of URI segments and request parameters into aggregates broken. * DATACMNS-1739 - Use standard Spring code of conduct.
Read more >
Uri.Segments Property (System) | Microsoft Learn
The Segments property returns an array of strings containing the "segments" (substrings) that form the URI's absolute path. The first segment is obtained...
Read more >
URI Class — CodeIgniter 3.1.13 documentation
The optional second parameter defaults to NULL and allows you to set the return value of this method when the requested URI segment...
Read more >
URI Class — ExpressionEngine 6 Documentation
The URI Class provides methods that help you retrieve information from your URI ... lets you turn URI segments into an associative array...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found