`
lin5061
  • 浏览: 80733 次
社区版块
存档分类
最新评论

oracle中文出现错误

阅读更多

 今天把oracle换了一下安定北京,但是原来的代码没换,测试添加数据时报了一个莫名的错误:can bind a LONG value only for insert into a LONG column  上网看了看大家的说法,原来是oracle版本稍微变了,但是和hibernate还有驱动不相容,所以插入中文就有错。也没怎么深究,不填中文就行了。这是不大问题,记一下,后面再改吧。其实换换驱动就可以解决了,[url=http://www.andingbeijing.com]安定北京[/url]但一时懒得去找了:)

 

2007-05-15 13:45:11,156 DEBUG [org.hibernate.SQL] - <insert into info_pub_article_type (description, icon, icon_open, is_open, parent_type_uuid, type_name, target, url, article_type_uuid) values (?, ?, ?, ?, ?, ?, ?, ?, ?)>
2007-05-15 13:45:11,187 WARN [org.hibernate.util.JDBCExceptionReporter] - <SQL Error: 1461, SQLState: 72000>
2007-05-15 13:45:11,187 ERROR [org.hibernate.util.JDBCExceptionReporter] - <ORA-01461: can bind a LONG value only for insert into a LONG column
>
2007-05-15 13:45:11,187 WARN [org.hibernate.util.JDBCExceptionReporter] - <SQL Error: 1461, SQLState: 72000>
2007-05-15 13:45:11,234 ERROR [org.hibernate.util.JDBCExceptionReporter] - <ORA-01461: can bind a LONG value only for insert into a LONG column
>
2007-05-15 13:45:11,234 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] - <Could not synchronize database state with session>
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
 at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
 at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
 at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
 at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
 at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:388)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
 at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:676)
 at com.sitechasia.webx.core.dao.hibernate3.BaseHibernateDao.genericSave(BaseHibernateDao.java:277)
 at com.sitechasia.webx.core.dao.hibernate3.HibernateDomainObjectDao.doSave(HibernateDomainObjectDao.java:72)
 at com.sitechasia.xinnet.infopub.dao.impl.ArticleTypeDaoImpl.doSaveArticleType(ArticleTypeDaoImpl.java:45)
 at com.sitechasia.xinnet.infopub.test.TestArticletype.testAddArticleTypeByRandom(TestArticletype.java:76)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column

 

 at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
 at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8738)
 at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
 at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
 at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
 ... 28 more

安定北京

分享到:
评论
2 楼 lin5061 2008-10-05  
数据库建立的时候选择UTF-8就行了
1 楼 oboaix 2008-06-01  
?????兄弟有没解决了

相关推荐

    oracle错误中文解释

    oracle错误中文解释

    oracle 错误码大全

    oracle 数据库错误码 中文介绍原因

    ORACLE错误中文说明.rar

    ORACLE错误中文说明, 错误码的对映中文说明.

    ORACLE错误码大全_中文

    ORACLE错误码大全,这个是docx格式的,大部分忆翻译成中文,方便查阅

    oracle中文手册合集(CHM)

    Oracle官方SQL参考手册、oracle函数大全、Ora9iSQL参考手册、oracle函数大全(分类显示)、Oracle函数大全、Oracle函数手册、ORACLE九阴真经、oracle知识库、SQLCodes-Oracle错误代码与消息解释、SQL语言参考大全,10...

    Oracle错误码大全(CHM).rar

    Oracle错误码大全

    oracle中文手册合集 8个CHM

    Ora9iSQL参考手册 chm oracle函数大全 分类显示 chm Oracle函数大全 chm Oracle函数手册 chm ORACLE九阴真经 chm oracle知识库 CHM SQLCodes Oracle错误代码与消息解释 chm SQL语言参考大全 chm

    Oracle中文使用手册.pdf

    oerr ora 942 (装完系统后会装一个 oerr 工具,用于通过错误号来查看错误的具 体信息) 想在 sql 中执行 unix 命令时,把所有的命令前加一个!就可以, 或者 host( 用于 从 sql 从切换至 unix 环境中去) /*** ...

    Oracle 中文手册

    Ora9iSQL参考手册 oracle函数大全 分类显示 Oracle函数大全 Oracle函数手册 ORACLE九阴真经 oracle知识库 SQLCodes Oracle错误代码与消息解释 SQL语言参考大全

    oracle错误一览表

    针对oracle遇到的错误给出中文解释

    oracle中文手册合集 CHM版

    【文件清单】 Ora9iSQL参考手册.chm oracle函数大全(分类显示).chm Oracle函数大全.chm Oracle函数手册.chm ORACLE九阴真经.chm ...SQLCodes-Oracle错误代码与消息解释.chm SQL语言参考大全.chm 不喜勿下

    oracle错误代码

    oracle错误代码 可以根据oracle错误代码查看中文意思

    oracle 字符集乱码解决

    如WE8ISO8859P1或US7ASCII,而这两个字符集都没有汉字编码,虽然有些时候选用这种字符集好象也能正常使用,但用这种字符集存储汉字信息从原则上说就是错误的,它会给数据库的使用与维护带来一系列的麻烦。...

    Oracle数据库学习指南

    11. Oracle常见错误代码 12. Oracle常用Script 13. Oracle常用数据字典 14. ORACLE回滚段管理(上) 15. ORACLE回滚段管理(下) 16. Oracle基于Client-Server的性能调整 17. Oracle数据库的安全策略 18. ...

    Oracle常用技术资料合集.zip

    四、Oracle中文手册合集(8个CHM) Ora9iSQL参考手册.chm Oracle函数大全.chm oracle函数大全(分类显示).chm Oracle函数手册.chm ORACLE九阴真经.chm oracle知识库.CHM SQL语言参考大全.chm SQLCodes-Oracle错误代码与...

    oracle api合集(包含oracle语法解释、函数解析以及各种错误解析)

    oracl api 合集,包含各种Oracle错误解释以及各种方法说明,不完全是中文

    oracle 错误码大全.txt

    oracle错误码大全,通过错误码获取中英文释义;例如:871 ORA-01449 通过01449就能查询到它的中文释义列包含 NULL 值;无法将其改变为 NOT NULL 其英文为 column contains NULL values; cannot alter to NOT NULL

    Oracle错误代码

    Oracle 错误中文代码查询 收集的不全 欢迎大家补全

    Oracle所有错误

    文档中记录所有Oracle错误代号 帮助你解决问题

Global site tag (gtag.js) - Google Analytics