You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then an exception is thrown in native mode at runtime:
java.lang.IllegalStateException: java.lang.NoSuchMethodException: no such method: java.lang.Integer.valueOf(String)Integer/invokeStatic
at org.apache.camel.openapi.RestOpenApiReader.convertAndSetItemsEnum(RestOpenApiReader.java:722)
at org.apache.camel.openapi.RestOpenApiReader.defineSchemas(RestOpenApiReader.java:669)
at org.apache.camel.openapi.RestOpenApiReader.doParseVerb(RestOpenApiReader.java:505)
at org.apache.camel.openapi.RestOpenApiReader.doParseVerbs(RestOpenApiReader.java:443)
at org.apache.camel.openapi.RestOpenApiReader.parse(RestOpenApiReader.java:258)
at org.apache.camel.openapi.RestOpenApiReader.read(RestOpenApiReader.java:138)
Bug description
An issue I stumbled upon while investigating #5528.
If you choose to use the
openapi-java
extension and have something like the following in the REST definition:Then an exception is thrown in native mode at runtime:
From this logic:
https://github.com/apache/camel/blob/main/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java#L504-L518
These types need registering for method reflection:
https://github.com/apache/camel/blob/main/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java#L501-L518
The other types don't actually have a
valueOf
method so they fail even in JVM mode.The text was updated successfully, but these errors were encountered: