Tag Archives: Programming error

Handler dispatch failed; nested exception is java.lang.StackOverflowError

Welcome to my official account, add me as a friend!

Springboot project encountered “handler dispatch failed; nested exception is java.lang.StackOverflowError ”My mistake.

To sum up:

Stackoverflowerror is usually a dead loop or loop dependent.

Caused by: java.lang.StackOverflowError
	at com.hry.seckill.service.impl.GoodsServiceImpl.getGoodsVoList(GoodsServiceImpl.java:17)
	at com.hry.seckill.service.impl.GoodsServiceImpl.getGoodsVoList(GoodsServiceImpl.java:17)
	at com.hry.seckill.service.impl.GoodsServiceImpl.getGoodsVoList(GoodsServiceImpl.java:17)
	at com.hry.seckill.service.impl.GoodsServiceImpl.getGoodsVoList(GoodsServiceImpl.java:17)
	at com.hry.seckill.service.impl.GoodsServiceImpl.getGoodsVoList(GoodsServiceImpl.java:17)
	at com.hry.seckill.service.impl.GoodsServiceImpl.getGoodsVoList(GoodsServiceImpl.java:17)

 
Then check the location of the location and find the error:

 
 

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsService goodsService;

I did not correctly refer to mapper in service, but referred to service, so I can report an error and correct it.

 

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

Finally, restart the project.

Welcome to my official account, add me as a friend!