Null pointer for entity class attributes under ssm framework


org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: **Error evaluating expression "user.id!=""||user.id!=null".** Cause: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "id")
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
Oct.15,2021

    <if test="usr!=null">
        <if test="usr.id!=null"> and u_id=-sharp{usr.id} </if>
    </if>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b951-2c2b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b951-2c2b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?