Pivotal Knowledge Base

Follow

Spring Cloud Services Broker's Dashboard Error: "PathNotFoundException: Path 'service_plan' not Found in the Current Context"

Environment 

 Product  Version
 Elastic Runtime  1.7
 Spring Cloud Service  Prior to 1.1.0

Overview

This article provides a way to resolve the error: "PathNotFoundException: Path 'service_plan' not found in the current context" when accessing the Spring Cloud Service broker's dashboard.

Symptom

Accessing the dashboard for Spring Cloud Services broker at /admin/serviceInstances results in an error:

Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [RTR] OUT spring-cloud-broker.cfapps-dev002.nam.nsroot.net - [07/12/2016:18:49:20 +0000] "GET /admin/instancesStatus HTTP/1.1" 200 0 454 "https://spring-cloud-broker.xxx.xxxx/admin/serviceInstances" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36" 10.116.5.2:63003 x_forwarded_for:"172.25.98.80" x_forwarded_proto:"https" vcap_request_id:55461601-826c-4764-5733-913c10f0126a response_time:0.039970778 app_id:02c5d890-a5cd-4d4b-bcae-6a4c6cbb98a6 
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT 2016-12-07 18:49:20.847 ERROR 18 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.jayway.jsonpath.PathNotFoundException: Path 'service_plan' not found in the current context:���
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT {"guid":"290df0ac-6390-4ecf-ac31-6cb5b78409db","name":"gemfire-session_replication","bound_app_count":1}] with root cause
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT com.jayway.jsonpath.PathNotFoundException: Path 'service_plan' not found in the current context:
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at com.jayway.jsonpath.JsonPath.read(JsonPath.java:255)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT {"guid":"290df0ac-6390-4ecf-ac31-6cb5b78409db","name":"gemfire-session_replication","bound_app_count":1}
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at com.jayway.jsonpath.internal.filter.FieldFilter.filter(FieldFilter.java:93)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at io.pivotal.springcloud.util.JsonUtils.jsonPath(JsonUtils.java:76)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at com.jayway.jsonpath.internal.JsonReader.read(JsonReader.java:103)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at com.jayway.jsonpath.internal.JsonReader.read(JsonReader.java:97
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at io.pivotal.springcloud.servicebroker.support.service.AdminReportService.lambda$null$3(AdminReportService.java:58)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [RTR] OUT spring-cloud-broker.xxxx.xxx.xxx - [07/12/2016:18:49:20 +0000] "GET /admin/instancesReport HTTP/1.1" 500 0 342 "https://spring-cloud-broker.xxxx.xxxx/admin/serviceInstances" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36" 10.116.5.4:63740 x_forwarded_for:"172.25.98.80" x_forwarded_proto:"https" vcap_request_id:05c9bae6-5774-4151-6717-38416212ffe3 response_time:0.364448492 app_id:02c5d890-a5cd-4d4b-bcae-6a4c6cbb98a6
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at io.pivotal.springcloud.servicebroker.support.service.AdminReportService.lambda$getServiceInstanceReportDetails$7(AdminReportService.java:54)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at io.pivotal.springcloud.servicebroker.support.service.AdminReportService.getServiceInstanceReportDetails(AdminReportService.java:51)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at io.pivotal.springcloud.servicebroker.support.web.AdminRestController.getInstancesReport(AdminRestController.java:62)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Wed Dec 07 2016 10:49:20 GMT-0800 (Pacific Standard Time) [APP] OUT at java.lang.reflect.Method.invoke(Method.java:498)

Cause 

This is an existing thread safety issue with versions prior to 1.1.0. This is essentially a problem with certain fields (service_plan) not existing for some reason in the JSON. This is a bug with the JSON processing of objects on Spring Cloud Services internals. 

Resolution

This issue was fixed in version 1.1.0. Upgrade and higher.

Comments

Powered by Zendesk