hibernate方言设置问题
使用hibernate操作数据库出现以下错误,怀疑方言没有设置,请问连接oracle应该真设置!
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
[解决办法]
看看需要的包是否都放进去了。可能是少包。
[解决办法]
10g的方言可以这么配(cfg.xml文件中)
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
你的异常信息贴得不全,不一定就是方言的问题哦。
[解决办法]
配置log4j,看下你sql语句哪儿出问题了