当前位置:  数据库>oracle

Oracle读取数据错误和hibernate几个问题

    来源: 互联网  发布时间:2017-04-04

    本文导语: org.hibernate.type.NullableType nullSafeGet could not read column value from result set: CONTRIB23_35_; 无法转换为内部表示 我在解决该反常的方式是:1.依据提醒肯定展现问题的数据类别.(过滤无须要的检验,削减耗费在该问题上的工夫淘宝商城:。看懂...

org.hibernate.type.NullableType nullSafeGet could not read column value from result set: CONTRIB23_35_; 无法转换为内部表示

我在解决该反常的方式是:
1.依据提醒肯定展现问题的数据类别.(过滤无须要的检验,削减耗费在该问题上的工夫淘宝商城:。看懂反常是主要问题).
2.核查数据库字段类别与POJO类的字段数据类别是否相称.
3.检验数据库字段内的value.
如:你的数据库字段类别为number那么在手动照射POJO时也许你会把它写成int类别这么本身是不曾错的(在你数据库内的值不曾超出 int的长度前).然而由于数据库的字段类别为number那么在测验时或许你会手动插入一些值.而值的长度超出int所能接纳的长度。那么在过程运行时对该字段举行get时就会展现上面的差错。这是其一。



hibernate几个问题

Excel单元格中的回车/换行  Alt+Enter

2008-2-2 9:45:13 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: Unknown column 'tjsaleresu0_.isupdate' in 'field list'
2008-2-2 9:45:13 org.hibernate.event.def.DefaultLoadEventListener onLoad
信息: Error performing load command
org.hibernate.exception.SQLGrammarException: could not load an entity: [ookj.domain.TjSaleResult#293]




--数据库中没有“isupdate”字段

2008-2-2 9:51:42 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1052, SQLState: 23000
2008-2-2 9:51:42 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: Column 'df' in where clause is ambiguous


————find("select tsr from TjSaleResult tsr, TjItemResult tir where tsr=tir.saleResultId and tir=? and df1", new Object[]{tir});
————语句中的df不能确定是哪个表的

org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: trackDate of: ookj.domain.TjReagentTrack [from ookj.domain.TjReagentTrack trt where trt.trackStage=? and trt.trackDate=? and trt.userId=? and trt.df1]; nested exception is org.hibernate.QueryException: could not resolve property: trackDate of: ookj.domain.TjReagentTrack [from ookj.domain.TjReagentTrack trt where trt.trackStage=? and trt.trackDate=? and trt.userId=? and trt.df1]
Caused by: org.hibernate.QueryException: could not resolve property: trackDate of: ookj.domain.TjReagentTrack [from ookj.domain.TjReagentTrack trt where trt.trackStage=? and trt.trackDate=? and trt.userId=? and trt.df1]


————问题是配置中:
       private static String[][] properties={
          {"getReagentTrackId","reagent_trackid","0"},
          {"getReagentId","reagentid","1"},
          {"getUserId","userid","1"},
          {"getGuideBookId","guidebookid","1"},
          {"getTrackTime","tracktime","0"},                //这里名称不对
          {"trackStage","trackstage","0"},
          {"getDf","df","0"}
————还有nd trt.trackDate=? 语句中的值有误。










java.lang.ClassCastException: ookj.domain.OokjDateTime

————基本的  类型转换错误

  String sql = "from TjReagentTrack trt where trt.trackStage=? and trt.trackTime like ? and trt.userId=? and trt.df1";
  List list_reagenttrack = srs.find(sql, new Object[]{TjReagentTrack.TRACKSTAGE_QU, "%"+new OokjDate(new Date()).toString()+"%", su});


  ApplicationInstance.getActive().setFocusedComponent(textField_Register);

————Echo2焦点问题


org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: ookj.domain.SmDept; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: ookj.domain.SmDept
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: ookj.domain.SmDept

————new了一个新对象,在未保存之前将它保存进了一个新new的对象。

问题1,quartz 1.6 配置问题。需要使用common-collection-1.3.jar

信息: could not read column value from result set: activep19_59_; could not deserialize
Exception in thread "main" org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
Caused by: org.hibernate.type.SerializationException: could not deserialize
 at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:217)
 at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
 at org.hibernate.type.SerializableType.fromBytes(SerializableType.java:82)
 at org.hibernate.type.SerializableType.get(SerializableType.java:39)
 at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
 at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
 at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
 at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2096)
 at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
 at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
 at org.hibernate.loader.Loader.getRow(Loader.java:1206)
 at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
 at org.hibernate.loader.Loader.doQuery(Loader.java:701)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
 at org.hibernate.loader.Loader.doList(Loader.java:2220)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
 at org.hibernate.loader.Loader.list(Loader.java:2099)
 at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
 at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
 at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
 at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
 at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:849)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
 at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)
 at ookj.dao.pub.impl.CommonDaoImpl.find(CommonDaoImpl.java:96)
 at ookj.service.impl.BasicServiceImpl.find(BasicServiceImpl.java:45)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at $Proxy1.find(Unknown Source)
 at ookj.ui.barcode.BarCodePerson.returnBookFromCode(BarCodePerson.java:63)
 at ookj.ui.barcode.BarCodePerson.getFengMian(BarCodePerson.java:44)
 at ookj.ui.barcode.BarCodePerson.main(BarCodePerson.java:28)
Caused by: java.io.EOFException
 at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
 at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
 at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
 at java.io.ObjectInputStream.(Unknown Source)
 at org.hibernate.util.SerializationHelper$CustomObjectInputStream.(SerializationHelper.java:252)
 at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)
 ... 40 more


















































++++++++++
============
org.hibernate.type.SerializationException could not deserialize;

我用的数据库是mysql,在通过pojo类自动生成的类中,未为字段指定type,hibernate对自动为其指定,如果它所生成的type不能被反序列化,就会抛出java.util.ServilizableException

比如我产生异常的原因是我建立了一个string[]类型的字段,但在对应的.hbm.xml文件中我没有显式定义它的类型,hibernate自动为其指定了类型,该类型不能被反序列化。


2008-1-29 14:06:31 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: Invalid value for getInt() - '2008-01-18 12:12:12' in column 24
2008-1-29 14:06:32 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2008-1-29 14:06:32 org.springframework.jdbc.support.SQLErrorCodesFactory
信息: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]





+++++++++
=======


Expected positional parameter count: 1, actual parameters: [] [select m from TjMedicalName m, TjSaleResult s where s.guideBookId = ? and s.df1 and s.saleItemId.medicalGroup.medicalId=m.medicalId]


++++bs.find("select m from TjMedicalName m, TjSaleResult s where s.guideBookId = ? and s.df1 and s.saleItemId.medicalGroup.medicalId=m.medicalId");+++
====bs.find("select m from TjMedicalName m, TjSaleResult s where s.guideBookId = ? and s.df1 and s.saleItemId.medicalGroup.medicalId=m.medicalId", new Object[]{sgb});===


严重: line 1:143: expecting IDENT, found '.'
2008-2-3 0:41:01 org.apache.catalina.core.StandardWrapperValve invoke
��重: Servlet.service() for servlet tijianServlet threw exception
org.springframework.orm.hibernate3.HibernateQueryException: expecting IDENT, found '.' near line 1, column 143 [select t.saleItemId.medicalGroup from ookj.domain.TjSaleResult t where t.guideBookId=? and t.saleItemId.medicalGroup.block=? and t.saleItemId..medicalGroup.df1]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found '.' near line 1, column 143 [select t.saleItemId.medicalGroup from ookj.domain.TjSaleResult t where t.guideBookId=? and t.saleItemId.medicalGroup.block=? and t.saleItemId..medicalGroup.df1]
Caused by: org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found '.' near line 1, column 143 [select t.saleItemId.medicalGroup from ookj.domain.TjSaleResult t where t.guideBookId=? and t.saleItemId.medicalGroup.block=? and t.saleItemId..medicalGroup.df1]




_____多了一个点

java.net.SocketException: java.net.ConnectException: Connection refused: connect


————数据库未启动


严重: Servlet.service() for servlet tijianServlet threw exception
java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!


————忘了怎么解决的了,反正不是大问题。

严重: Servlet.service() for servlet tijianServlet threw exception
java.lang.NoSuchMethodError: ookj.service.SendReagentService.saveTjSendReagent(Lookj/domain/TjReagent;Lookj/domain/SaleGuideBook;)[Ljava/lang/String;

————TomcatJava虚拟集中代码未跟上,不能保持同步,重启虚拟机就好了。

严重: Unknown column 'tjsendreag0_.tj_sendreagent' in 'field list'
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'tjsendreag0_.tj_sendreagent' in 'field list'



————配置文件hbr.xml中写的tj_sendreagent字段,在数据库中找不到。

1,TextField控件textField_Maker.setEnabled(false);为禁用true为可用。

2,
  GroupBox groupBox_GeRenJiHuo = new GroupBox();
  groupBox_GeRenJiHuo.setWidth(new Extent(300, Extent.PX));
  groupBox_GeRenJiHuo.setTitle("个人预约激活");
  RowLayoutData groupBox_GeRenJiHuoLayoutData = new RowLayoutData();
  groupBox_GeRenJiHuoLayoutData.setInsets(new Insets(new Extent(20,
    Extent.PX)));
  groupBox_GeRenJiHuo.setLayoutData(groupBox_GeRenJiHuoLayoutData);
  row_JiHuo.add(groupBox_GeRenJiHuo);
  GroupBox groupBox_TuanDuiJiHuo = new GroupBox();
  groupBox_TuanDuiJiHuo.setWidth(new Extent(300, Extent.PX));
  groupBox_TuanDuiJiHuo.setTitle("团队预约激活");
  groupBox_TuanDuiJiHuo.setInsets(new Insets(new Extent(20, Extent.PX)));
  row_JiHuo.add(groupBox_TuanDuiJiHuo);













第二个是内部20的间隙。第一个没表现。


    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • linux下通过对文件读取方式查询oracle的版本信息
  • 读取oracle数据库表写文件慢
  • 用oracle pl/sql 从A unix机器,去读取B unix机器上的一个文件,怎么实现?
  • Oracle除去数据中的换行符以免读取出现问题
  • 请问如何用Java从Oracle数据库中读取媒体文件,如图片,mpeg 等
  • apache通过php的oci函数读取Oracle(字符集ZHS16GBK)时,显示乱码,如何解决?
  • linux下用什么办法连接oracle数据库并且读取数据呢?(用c++代码实现时)
  • jsp读取oracle8.1.6数据表中的中文,读出为?,着急啊。
  • 小妹求教!!关于jsp操作oracle数据库操作的问题(文件读取,插入数据库表相应字段中)
  • 请问oracle的clob字段可不可以存富文本的文件,like .doc .rtf?如果可以如何用java读取?
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle 数据库开发工具 Oracle SQL Developer
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • Oracle EBS R12 支持 Oracle Database 11g
  • Oracle 10g和Oracle 11g网格技术介绍
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • Linux /$ORACLE_HOME $ORACLE_HOME
  • ORACLE日期相关操作
  • Linux系统下Oracle的启动与Oracle监听的启动
  • ORACLE数据库常用字段数据类型介绍
  • 请问在solaris下安装ORACLE,用root用户和用oracle用户安装有什么区别么?
  • Oracle 12c的九大最新技术特性介绍


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3