项目环境: Struts-2.3.16.3
Hibernate-4.3.6
Spring-4.1.1
在启动Jetty时,一直报这个错,对项目却没有影响。但是总看着不是那么爽。
Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
于是,百度,百度,找到这个,可能的原因: Hibernate is just verifying if the DB supports some features and adjusting itself in case it doesn't.So, it's trying to determine if it can use some new JDBC 4 methods. I guess your driver may not support the new LOB creation method
如果不想看到这个消息,可以在hibernate配置里加上 hibernate.temp.use_jdbc_metadata_defaults" ---- false 就可以了。更新驱动没试过。有兴趣的可以试一下。

在使用Struts-2.3.16.3、Hibernate-4.3.6和Spring-4.1.1的项目中,遇到Jetty启动时报错DisablingcontextualLOBcreationascreateClob()methodthrewerror:java.lang.reflect.InvocationTargetException。文章通过百度查找原因,发现可能是Hibernate验证数据库是否支持某些特性,并根据不支持的情况调整自身。解决此问题的方法是在hibernate配置中设置hibernate.temp.use_jdbc_metadata_defaults为false。文章建议尝试更新数据库驱动以解决此提示。
576

被折叠的 条评论
为什么被折叠?



