Data service architecture: spring Roo + hibernate+mysql
When calling the stored procedure, it appears: No Dialect mapping for JDBC type: 0
By decompiling java.sql.Types.java, we know that type:0 corresponds to NULL
![No Dialect mapping for JDBC type :0 - ftutor - ftutor ops](http://img0.ph.126.net/vmujusxbRHm6acAPv267Nw==/1892356268526318999.png)
The reason is that java.sql.Types in java defines NULL
parsing , but hibernate's dialect cannot support it. When using spring roo to configure the project, the jpa used is hibernate, then the default persistent.xml One of the behaviors:
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
This is the dialect used to define hibernate, we can reimplement this dialect and then reassign the value:
![No Dialect mapping for JDBC type :0 - ftutor - ftutor ops](http://img0.ph.126.net/lWfjDN-GAwPT7bWv4j9LpQ==/6597986759355870084.png)
Then change this property in persistent.xml to the location of the MysqlDialect class and it will be ok
This enables hibernate to support NULL type type values.
In addition, we need to make further modifications. In the applicationContext.xml that defines the sessionFactory, we also need to define Dialect to point to our newly defined class to completely solve this problem.