The NullPointerException is occurring in the LineController class at line 26. It is caused by trying to invoke the longValue() method on a null value for the lineId variable. The code is trying to convert the lineId from a Long object to a primitive long value, but since lineId is null, the NullPointerException is thrown.

To fix this issue, you need to ensure that the lineId variable is not null before invoking the longValue() method. You can add a null check before invoking the method, like this:

if (lineId != null) {
    long id = lineId.longValue();
    // Rest of the code
}

This will prevent the NullPointerException from occurring when lineId is null

javalangNullPointerException Cannot invoke javalangLonglongValue because lineId is null	at comtraveltouristservicesystemcontrollerLineControllergetListLineControllerjava26	at javabasejdkinternalreflec

原文地址: https://www.cveoy.top/t/topic/hWo6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录