HQL uses query.List () as a null pointer exception, but the database can detect the result
Solutions:
Check that the database dialect is configured correctly in hibernate configuration
org.hibernate.dialect.OracleDialect
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="dynamic-update">true</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
</props>
</property>
Give common database dialects
| RDBMS th> | dialect th> tr> |
|---|---|
| DB2 td> | org. Hibernate. The dialect. DB2Dialect td> tr> |
| DB2 AS/400 | org.hibernate.dialect.DB2400Dialect |
| DB2 OS390 | org.hibernate.dialect.DB2390Dialect |
| PostgreSQL | org.hibernate.dialect.PostgreSQLDialect |
| MySQL | org.hibernate.dialect.MySQLDialect |
| MySQL with InnoDB | org.hibernate.dialect.MySQLInnoDBDialect |
| MySQL with MyISAM | org.hibernate.dialect.MySQLMyISAMDialect |
| Oracle (any version) | org.hibernate.dialect.OracleDialect |
| Oracle 9i/10g | org.hibernate.dialect.Oracle9Dialect |
| Sybase | org.hibernate.dialect.SybaseDialect |
| Sybase Anywhere | org.hibernate.dialect.SybaseAnywhereDialect |
| Microsoft SQL Server | org.hibernate.dialect.SQLServerDialect |
| SAP DB | org.hibernate.dialect.SAPDBDialect |
| Informix | org.hibernate.dialect.InformixDialect |
| HypersonicSQL | org.hibernate.dialect.HSQLDialect |
| Ingres | org.hibernate.dialect.IngresDialect |
| Progress | org.hibernate.dialect.ProgressDialect |
| Mckoi SQL | org.hibernate.dialect.MckoiDialect |
| Interbase | org.hibernate.dialect.InterbaseDialect |
| Pointbase | org.hibernate.dialect.PointbaseDialect |
| FrontBase | org.hibernate.dialect.FrontbaseDialect |
| Firebird | org.hibernate.dialect.FirebirdDialect |
Read More:
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- Solution to the problem that SQL database query result field contains new line character, which leads to copy to excel dislocation
- When the spring MVC project is running on idea, an error is reported when the controller is a null pointer
- nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property
- The solution of Hibernate query returning all null lists
- After the go pointer is declared and assigned, a panic: runtime error: invalid memory address or nil pointer reference appears
- Solution to null pointer error in array
- How can Oracle query tables of other users without adding a table user name
- Solve the interceptor calling service layer to display null pointer.
- Failed to get the resources path in the jar package, reporting an error null pointer
- Could NOT find CUDNN: Found unsuitable version “..“, but required is at least “6“
- An error is reported when kettle connects Oracle database and MySQL database
- How to Solve mybatis returns null when querying Oracle database with char type field
- How to use C + + function pointer array
- SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
- ssh can connect but sftp can not connect
- An error is reported when installing the package directly in pycharm, but it can be installed through the terminal. Error non zero exit code (2)
- The 406 status code can not find acceptable representation is returned in spring MVC
- 【Bug-python】IndexError: list index out of range