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
docker run -it -p 8080:8080 restbucks:1.0.0-SNAPSHOT
do a POST request
POST http://localhost:8080/orders
Content-Type: application/json
{
"location": "To go"
}
You'll get 500 with:
13:50:00.280 I - main : Started Restbucks in 0.385 seconds (process running for 0.393)
13:50:02.678 I - andler-0 : Initializing Spring DispatcherServlet 'dispatcherServlet'
13:50:02.678 I - andler-0 : Initializing Servlet 'dispatcherServlet'
13:50:02.678 I - andler-0 : Completed initialization in 0 ms
13:50:02.681 E - andler-0 : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.NullPointerException] with root cause
java.lang.NullPointerException: null
at org.springsource.restbucks.order.web.LocationAndDrinks.toOrder(LocationAndDrinks.java:43)
at de.odrotbohm.spring.web.model.MappedPayloads$MappedPayload.mapIfValid(MappedPayloads.java:455)
at org.springsource.restbucks.order.web.OrderController.placeOrder(OrderController.java:53)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
Hint
It's possible there's missing metadata (or incompatible classes)for the native compilation; playing around with the app, I also got:
13:41:35.805 E - andler-2 : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class org.springsource.restbucks.drinks.Drink: Common causes of this problem include using a final class or a non-visible class] with root cause
java.lang.NoSuchFieldException: CGLIB$FACTORY_DATA
at [email protected]/java.lang.Class.checkField(DynamicHub.java:1044)
at [email protected]/java.lang.Class.getField(DynamicHub.java:1029)
The text was updated successfully, but these errors were encountered:
13:57:29.771 I - andler-0 : Completed initialization in 0 ms
13:57:37.963 I - andler-1 : Couldn't read class metadata for interface org.springsource.restbucks.order.OrderProjection. Input property calculation might fail
it's possible that the Rest API does not handle the error cases very well, hence some 500
Http failure response for http://localhost:8080/orders/search/findByStatus?status=jjj: 500 OK
{
"cause": {
"cause": {
"cause": null,
"message": "No enum constant org.springsource.restbucks.order.Order$Status.jjj"
},
"message": "Failed to convert from type [java.lang.String] to type [@org.springframework.data.repository.query.Param org.springsource.restbucks.order.Order$Status] for value [jjj]"
},
"message": "Failed to convert jjj into org.springsource.restbucks.order.Order$Status"
}
You'll get 500 with:
Hint
It's possible there's missing metadata (or incompatible classes)for the native compilation; playing around with the app, I also got:
The text was updated successfully, but these errors were encountered: