Skip to content
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

Adding content to s3-storage fails with http 500 when using spring boot 3.2.1+ #1906

Closed
NielsCW opened this issue Apr 15, 2024 · 2 comments · Fixed by #1924
Closed

Adding content to s3-storage fails with http 500 when using spring boot 3.2.1+ #1906

NielsCW opened this issue Apr 15, 2024 · 2 comments · Fixed by #1924

Comments

@NielsCW
Copy link
Contributor

NielsCW commented Apr 15, 2024

Describe the bug
When adding uploading content to an entity the server responds with a 500 Internal Server Error
This only occurs when using s3-storage with the following spring-boot versions:

  • 3.1.7+
  • 3.2.1+

Detailed stack trace of the server:

java.lang.NullPointerException: null
	at java.base/java.lang.Class.isAssignableFrom(Native Method) ~[na:na]
	at org.springframework.content.commons.utils.PlacementServiceImpl$ContentPropertyInfoConverterAdapter.matches(PlacementServiceImpl.java:140) ~[spring-content-commons-3.0.9.jar:na]
	at org.springframework.core.convert.support.GenericConversionService$ConvertersForPair.getConverter(GenericConversionService.java:629) ~[spring-core-6.1.4.jar:6.1.4]
	at org.springframework.core.convert.support.GenericConversionService$Converters.getRegisteredConverter(GenericConversionService.java:526) ~[spring-core-6.1.4.jar:6.1.4]
	at org.springframework.core.convert.support.GenericConversionService$Converters.find(GenericConversionService.java:510) ~[spring-core-6.1.4.jar:6.1.4]
	at org.springframework.core.convert.support.GenericConversionService.getConverter(GenericConversionService.java:233) ~[spring-core-6.1.4.jar:6.1.4]
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:180) ~[spring-core-6.1.4.jar:6.1.4]
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:165) ~[spring-core-6.1.4.jar:6.1.4]
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.getResource(DefaultS3StoreImpl.java:145) ~[spring-content-s3-3.0.9.jar:na]
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.getResource(DefaultS3StoreImpl.java:124) ~[spring-content-s3-3.0.9.jar:na]
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.setContent(DefaultS3StoreImpl.java:362) ~[spring-content-s3-3.0.9.jar:na]
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.setContent(DefaultS3StoreImpl.java:334) ~[spring-content-s3-3.0.9.jar:na]
	at internal.org.springframework.content.commons.store.factory.StoreImpl.lambda$setContent$3(StoreImpl.java:105) ~[spring-content-commons-3.0.9.jar:na]
	at internal.org.springframework.content.commons.store.factory.StoreImpl.internalSetContent(StoreImpl.java:160) ~[spring-content-commons-3.0.9.jar:na]
	at internal.org.springframework.content.commons.store.factory.StoreImpl.setContent(StoreImpl.java:103) ~[spring-content-commons-3.0.9.jar:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at internal.org.springframework.content.commons.store.factory.StoreMethodInterceptor.invoke(StoreMethodInterceptor.java:74) ~[spring-content-commons-3.0.9.jar:na]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.4.jar:6.1.4]
	at internal.org.springframework.content.commons.store.factory.StoreExceptionTranslatorInterceptor.invoke(StoreExceptionTranslatorInterceptor.java:23) ~[spring-content-commons-3.0.9.jar:na]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.4.jar:6.1.4]
	...

Additional context
See also failing PR of dependabot

@tgeens
Copy link
Contributor

tgeens commented Apr 18, 2024

Looking through the Spring Boot 3.2.1 release notes, I encountered this possibly related change: spring-projects/spring-boot#38734 ?

@paulcwarren
Copy link
Owner

I think that I have reproduced this issue. Investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants