java.lang.NullPointerException] with root cause

Time:2021-4-21

General content of error report

java.lang.NullPointerException] with root cause

Write on the front

Explanation: This is just one of the reasons I found. Maybe yours is different from mine. If the problem is not solved, spray gently..

Project brief

SSM project, developed with eclipse.

Background notes

Add commodities in the background of the mall. After filling in the relevant information of the product, submit the form and report the error.

reason

When filling in, the input value should be consistent with the attribute type of POJO entity class, otherwise an error will be reported

 

example

Front page and part of the code

java.lang.NullPointerException] with root cause

java.lang.NullPointerException] with root cause

Background POJO class

java.lang.NullPointerException] with root cause

Since the price type in POJO class is double, don’t enter a string in the commodity price column (I entered some letters at random at the beginning of the test and reported an error, just enter a number instead.)

reference resources

java.lang.NullPointerException] with root cause

Recommended Today

SQL server stored procedure application 2: paging query data and dynamic splicing where conditions

preface In the development, the query function runs through the full text. We use stored procedure paging query one by one, and support dynamic splicing where condition. Key points:Support dynamic splicing where condition Students who have questions about the use of stored procedures【Creation and use of SQL server stored procedure】Make up lessons. As for whether […]