Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Unable to post to prodcut service using the same code with Java 17 #9

@Madan165

Description

@Madan165

Facing the following issue while doing POST request to product-service with same code using java 17.

java.lang.NullPointerException: Cannot invoke "com.programming.techie.productservice.repository.ProductRepository.save(Object)" because "this.productRepository" is null
at com.programming.techie.productservice.controller.ProductController.createProduct(ProductController.java:34) ~[main/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions