spring-projects / spring-projects/spring-data-rest

org.springframework.core.convert.ConversionFailedException

Open
#109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
958
Forks
568
PR merge metrics
No merged PRs in 30d

Description

I'm getting an org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.net.URI to type ....

Seems this has been introduced lately by this test in org.springframework.data.rest.repository.UriDomainClassConverter.convert

if (entity != null || !domainClassConverter.matches(STRING_TYPE, targetType)) {
throw new ConversionFailedException(sourceType, targetType, source, new IllegalArgumentException(
"No PersistentEntity information available for " + targetType.getType()));
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in org.springframework.data.rest.repository.UriDomainClassConverter.convert and inspect the reported ConversionFailedException path and its java.net.URI conversion inputs. Reproduce the failure, then use the issue's expected conversion behavior to determine when the reported conversion should complete without raising this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.