Skip to content

FDP v2 index GET index/entries fails on sort #633

@dennisvang

Description

@dennisvang

Running FDP v2.0.0-alpha.1 as a fresh index (without any registered FDPs), I see the following:

fdp v2 index screenshot

I would expect to see an empty list, not an error.

The following API request from the fdp-client results in a status 500:

GET http://localhost/index/entries?state=ACTIVE&sort=modificationTime,desc&page=0

And the FDP logs show missing properties modificationTime and state for IndexEntry:

...
fdp-1  | 2025-02-24 15:43:49,330 2046902 [http-nio-8080-exec-3] INFO  org.fairdatapoint.api.filter.LoggingFilter - http://localhost/index/entries
fdp-1  | 2025-02-24 15:43:49,339 2046911 [http-nio-8080-exec-3] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception 
    [Request processing failed: org.springframework.data.mapping.PropertyReferenceException:
      No property '["modificationTime"]' found for type 'IndexEntry'] with root cause
...
fdp-1  | 2025-02-24 15:44:12,922 2070494 [http-nio-8080-exec-5] INFO  org.fairdatapoint.api.filter.LoggingFilter - http://localhost/index/entries
fdp-1  | 2025-02-24 15:44:12,932 2070504 [http-nio-8080-exec-5] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception 
    [Request processing failed: org.springframework.data.mapping.PropertyReferenceException:
      No property '["state"]' found for type 'IndexEntry'] with root cause
...
fdp-1  |        at jdk.proxy2/jdk.proxy2.$Proxy247.findAllByStateEqualsAndPermitIn(Unknown Source) ~[?:?]
fdp-1  |        at org.fairdatapoint.service.index.entry.IndexEntryService.getEntriesPageWithPermits(IndexEntryService.java:155) ~[!/:1.17.1]
fdp-1  |        at org.fairdatapoint.service.index.entry.IndexEntryService.getEntriesPage(IndexEntryService.java:109) ~[!/:1.17.1]
fdp-1  |        at org.fairdatapoint.service.index.entry.IndexEntryService.getEntriesPageDTOs(IndexEntryService.java:165) ~[!/:1.17.1]
fdp-1  |        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
...
fdp-1  |        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-6.2.2.jar!/:6.2.2]
fdp-1  |        at org.fairdatapoint.service.index.common.IndexFeatureAspect.logExecutionTime(IndexFeatureAspect.java:47) ~[!/:1.17.1]
fdp-1  |        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
...
fdp-1  |        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:727) ~[spring-aop-6.2.2.jar!/:6.2.2]
fdp-1  |        at org.fairdatapoint.service.index.entry.IndexEntryService$$SpringCGLIB$$0.getEntriesPageDTOs(<generated>) ~[!/:1.17.1]
fdp-1  |        at org.fairdatapoint.api.controller.index.IndexEntryController.getEntriesPage(IndexEntryController.java:74) ~[!/:1.17.1]
fdp-1  |        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
...
fdp-1  |        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:723) ~[spring-aop-6.2.2.jar!/:6.2.2]
fdp-1  |        at org.fairdatapoint.api.controller.index.IndexEntryController$$SpringCGLIB$$0.getEntriesPage(<generated>) ~[!/:1.17.1]
fdp-1  |        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
...
fdp-1  |        at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137) ~[spring-security-web-6.4.2.jar!/:6.4.2]
fdp-1  |        at org.fairdatapoint.api.filter.JwtTokenFilter.doFilterInternal(JwtTokenFilter.java:64) ~[!/:1.17.1]
fdp-1  |        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.2.2.jar!/:6.2.2]
...
fdp-1  |        at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137) ~[spring-security-web-6.4.2.jar!/:6.4.2]
fdp-1  |        at org.fairdatapoint.api.filter.LoggingFilter.doFilterInternal(LoggingFilter.java:63) ~[!/:1.17.1]
fdp-1  |        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.2.2.jar!/:6.2.2]
...

A manual GET request to http://localhost/index/entries, without query parameters, does succeed and returns the expected empty list.

Using example compose file with the following modifications:

  • INSTANCE_INDEX: true
  • image: fairdata/fairdatapoint-index-client:develop

Metadata

Metadata

Assignees

Labels

bugSomething's wrong

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions