java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • On Spring Batch Admin 2.0.0-M1, a GET to http://localhost:8080/batch/executions.json returns a NullPointerException message : {code:json} [ "java.util.ArrayList", [ { "@class": "org.springframework.hateoas.VndErrors$VndError", "logref": "NullPointerException", "message": "NullPointerException", "links": [ "java.util.ArrayList", [] ] } ] ] {code} Here is the stacktrace: {code:java} 21:14:36.215 [ERROR] [qtp346861221-16] [] o.s.b.admin.web.RestControllerAdvice - Caught exception while handling a request java.lang.NullPointerException: null at org.springframework.batch.admin.domain.JobExecutionInfoResource.<init>(JobExecutionInfoResource.java:146) ~[spring-batch-admin-domain-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.instantiateResource(JobExecutionInfoResourceAssembler.java:63) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.instantiateResource(JobExecutionInfoResourceAssembler.java:36) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.hateoas.mvc.ResourceAssemblerSupport.createResourceWithId(ResourceAssemblerSupport.java:89) ~[spring-hateoas-0.16.0.RELEASE.jar:na] at org.springframework.hateoas.mvc.ResourceAssemblerSupport.createResourceWithId(ResourceAssemblerSupport.java:81) ~[spring-hateoas-0.16.0.RELEASE.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.toResource(JobExecutionInfoResourceAssembler.java:48) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.BatchJobExecutionsController.getJobExecutionInfoResource(BatchJobExecutionsController.java:208) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] {code} As you can seen on the nullpointerexception.jpg screenshot, the jobExecution.getEndTime() is null for a jobExecution in an UNKNOWN status.
    via by Elryk,
  • On Spring Batch Admin 2.0.0-M1, a GET to http://localhost:8080/batch/executions.json returns a NullPointerException message : {code:json} [ "java.util.ArrayList", [ { "@class": "org.springframework.hateoas.VndErrors$VndError", "logref": "NullPointerException", "message": "NullPointerException", "links": [ "java.util.ArrayList", [] ] } ] ] {code} Here is the stacktrace: {code:java} 21:14:36.215 [ERROR] [qtp346861221-16] [] o.s.b.admin.web.RestControllerAdvice - Caught exception while handling a request java.lang.NullPointerException: null at org.springframework.batch.admin.domain.JobExecutionInfoResource.<init>(JobExecutionInfoResource.java:146) ~[spring-batch-admin-domain-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.instantiateResource(JobExecutionInfoResourceAssembler.java:63) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.instantiateResource(JobExecutionInfoResourceAssembler.java:36) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.hateoas.mvc.ResourceAssemblerSupport.createResourceWithId(ResourceAssemblerSupport.java:89) ~[spring-hateoas-0.16.0.RELEASE.jar:na] at org.springframework.hateoas.mvc.ResourceAssemblerSupport.createResourceWithId(ResourceAssemblerSupport.java:81) ~[spring-hateoas-0.16.0.RELEASE.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.toResource(JobExecutionInfoResourceAssembler.java:48) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.BatchJobExecutionsController.getJobExecutionInfoResource(BatchJobExecutionsController.java:208) ~[spring-batch-admin-manager-2.0.0.M1.jar:na] {code} As you can seen on the nullpointerexception.jpg screenshot, the jobExecution.getEndTime() is null for a jobExecution in an UNKNOWN status.
    via by Elryk,
    • java.lang.NullPointerException: null at org.springframework.batch.admin.domain.JobExecutionInfoResource.<init>(JobExecutionInfoResource.java:146)[spring-batch-admin-domain-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.instantiateResource(JobExecutionInfoResourceAssembler.java:63)[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.instantiateResource(JobExecutionInfoResourceAssembler.java:36)[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.hateoas.mvc.ResourceAssemblerSupport.createResourceWithId(ResourceAssemblerSupport.java:89)[spring-hateoas-0.16.0.RELEASE.jar:na] at org.springframework.hateoas.mvc.ResourceAssemblerSupport.createResourceWithId(ResourceAssemblerSupport.java:81)[spring-hateoas-0.16.0.RELEASE.jar:na] at org.springframework.batch.admin.web.resource.JobExecutionInfoResourceAssembler.toResource(JobExecutionInfoResourceAssembler.java:48)[spring-batch-admin-manager-2.0.0.M1.jar:na] at org.springframework.batch.admin.web.BatchJobExecutionsController.getJobExecutionInfoResource(BatchJobExecutionsController.java:208)[spring-batch-admin-manager-2.0.0.M1.jar:na]
    No Bugmate found.