zalando / problem

A Java library that implements application/problem+json
https://zalando.github.io/problem
MIT License
891 stars 83 forks source link

Support Jakarta/Spring Boot 3.0 #433

Closed ydemartino closed 1 year ago

ydemartino commented 1 year ago

I tried running zalando with Spring Boot 3.0 and it is crashing.

Description

Zalando is referencing javax.servlet.http.HttpServletRequest which is not present in Spring Boot 3/JavaEE 8.

Expected Behavior

No crash

Actual Behavior

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
    at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-6.0.0-RC4.jar:6.0.0-RC4]
    ... 40 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
    ... 44 common frames omitted

Possible Fix

Migrate to jakarta package

Steps to Reproduce

  1. Update the demo project with Spring Boot 3.0

Context

Running zalando with Spring Boot 3.0

Your Environment

ydemartino commented 1 year ago

Sorry I've realized I opened the issue in the wrong repository