`
Kevin12
  • 浏览: 234827 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

could not read column value from result set: DBID_; Column 'DBID_' not found.

阅读更多
最近做项目,将原来项目中关于jbpm4(流程方面)的功能移到一个新的项目中,在某些查询时候,却发现了下面的问题,我用的数据库是mysql。
执行sql语句时候本来在数据库表中存在的字段,但是执行时候却报不存在,如果不用别名,就正确了,这是为什么?

Hibernate: SELECT  hpi.DBID_ as dbid,hpi.ID_ as pid,m.wwm_workflow_id as mainId,m.wwm_workflow_name as mainName,m.wwm_workflow_version as version,hpi.start_ as createTime,hpi.state_ as state,hpi.ENDACTIVITY_ as endActivity, qv.SWFQVL_PARAM_NAME7 as projectName from JBPM4_HIST_PROCINST hpi  left join tb_b_web_workflow_main m on m.wwm_workflow_key = substring(hpi.ID_,1,instr(hpi.ID_,'.')-1)  left join TB_B_SENSE_WORK_FLOW_QUERY_VAR qv on qv.SWFQVL_WORKFLOW_INSTANTS_ID=hpi.DBID_  left join JBPM4_HIST_VAR hv on hv.HPROCI_=hpi.DBID_ and hv.VARNAME_='work_flow_start_user' where hpi.STATE_ is not null and m.wwm_workflow_id is not null  order by hpi.START_ desc limit ?
2013-03-18 11:16:46,459 WARN  com.mchange.v2.c3p0.impl.NewPooledConnection  425 - [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
2013-03-18 11:16:46,459 WARN  com.mchange.v2.c3p0.impl.NewPooledConnection  426 - [c3p0] Another error has occurred [ java.sql.SQLException: Column 'DBID_' not found. ] which will not be reported to listeners!
java.sql.SQLException: Column 'DBID_' not found.
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
	at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1144)
	at com.mysql.jdbc.ResultSetImpl.getBigDecimal(ResultSetImpl.java:1414)
	at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBigDecimal(NewProxyResultSet.java:3602)
	at org.hibernate.type.BigIntegerType.get(BigIntegerType.java:57)
	at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:184)
	at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:210)
	at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.extract(CustomLoader.java:497)
	at org.hibernate.loader.custom.CustomLoader$ResultRowProcessor.buildResultRow(CustomLoader.java:443)
	at org.hibernate.loader.custom.CustomLoader.getResultColumnOrRow(CustomLoader.java:340)
	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:629)
	at org.hibernate.loader.Loader.doQuery(Loader.java:724)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
	at org.hibernate.loader.Loader.doList(Loader.java:2228)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
	at org.hibernate.loader.Loader.list(Loader.java:2120)
	at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)
	at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1722)
	at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
	at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)
	at com.sense.workflow.dao.ext.WorkflowExtDAO.findWorkflowList(WorkflowExtDAO.java:267)
	at com.sense.workflow.service.impl.WorkflowServiceImpl.findWorkflowList(WorkflowServiceImpl.java:345)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy9.findWorkflowList(Unknown Source)
	at com.sense.workflow.action.MyToDoAction.loadWorkflowList(MyToDoAction.java:571)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
	at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.sense.core.filter.ExceptionDisposeFilter.doFilter(ExceptionDisposeFilter.java:24)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:722)
三月 18, 2013 11:16:46 上午 org.hibernate.type.NullableType nullSafeGet
信息: could not read column value from result set: DBID_; Column 'DBID_' not found.
三月 18, 2013 11:16:46 上午 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 0, SQLState: S0022
三月 18, 2013 11:16:46 上午 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: Column 'DBID_' not found.[/color]


这个问题困扰了我两天,今天终于解决了。其中下面这个帖子中的一个解决方法给了我提示。
他说:这是beanutil里的一个bug,1.8.3已经修正,ReportManagerImpl.java需要改一下,RowSetDynaClass rsdc = new RowSetDynaClass(rs, true, true); 加上第三个参数,true, useColumnLabel,use JDBC column labels instead of the JDBC column names
参考网址:http://www.iteye.com/problems/43436
我的解决方法是:将原来项目中的链接mysql的架包换成更高版本的,结果重新运行项目,再进行查询时,问题解决了。
我用的架包:mysql-connector-java.jar
分享到:
评论

相关推荐

    Solution Manager Key 的 ABAP 程序

    IF LF_STRING(LF_LEN) NOT IN LC_ALLOWED_CHARS. ELSE. ``` #### 具体实现 在此处,程序通过一系列操作(如字符串转换、字符筛选等)来生成最终的Solution Manager Key。具体实现细节未完全给出,但从已有的代码...

    获取局域网数据库服务器列表

    String ls_name,ls_db_size,ls_owner,ls_dbid,ls_created,ls_status,ls_c_level DECLARE lsp_getdb PROCEDURE FOR sp_helpdb; EXECUTE lsp_getdb; FETCH lsp_getdb INTO :ls_name,:ls_db_size,:ls_owner,:ls_dbid,:...

    javaee三大框架整合宅急送项目lib包

    SQL [delete from JBPM4_EXECUTION where DBID_=? and DBVERSION_=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal...

    AWR报表内容对应SQL

    AND S.SNAP_ID = (SELECT MAX(SNAP_ID) FROM DBA_HIST_SNAPSHOTS WHERE DBID = &dbid AND SNAP_ID <= &end_snap); ``` 其中,`&beg_snap` 和 `&end_snap` 分别代表起始快照ID和结束快照ID。 ##### 2. 等待事件统计...

    sql最全的常用命令语句

    select count(*) from Master.dbo.SysProcesses where dbid=db_id(); ``` - **说明**:该命令用于查询当前数据库的连接数。`Master.dbo.SysProcesses` 表存储了所有正在运行的进程信息,`dbid` 是数据库标识符,...

    C++实现mySQL接口

    bool OrzMySQL::initialize(DBId _dbId, const Params<std::string>& _params) { return m_impl->initialize(_dbId, _params); } bool OrzMySQL::boost() { return m_impl->boost(); } void OrzMySQL::shutdown...

    数据库维护常用SQL

    (select sql_hash_value from v$session s, v$sql sql where s.sql_hash_value = sql.hash_value and rownum $lock.sid = s.sid), (select sql_text from v$session s, v$sql sql where s.sql_hash_value = sql....

    JBPM建表语句

    dbid_ NUMBER(19) not null, name_ CLOB, timestamp_ NUMBER(19), state_ VARCHAR2(255 CHAR) ) ``` - `dbid_`:主键字段,用于唯一标识一个部署记录,类型为`NUMBER(19)`。 - `name_`:部署名称,类型为`...

    微软内部资料-SQL性能优化3

    For an example of how to decode value from this column using the information above, let us assume we have the following value: 0x000705001F83D775010002014F0BEC4E With byte swapping within each ...

    ora分析脚本

    'ash 30 10 -f foo.txt' to display a 10 minutes period from [now - 30min] and store the result in file foo.txt - ash_wait_graph <minutes_from_now> [duration] [-f <file_name>] PQ event wait graph ...

    监控 SQL Server 的运行状况

    select count(*) from master.dbo.sysprocesses where dbid=db_id('数据库名称') ``` 这将返回指定数据库上的活动连接数量。此外,如果想要过滤掉系统进程,可以使用: ```sql select count(*) from master.....

    oracle报错大全(珍藏版)

    #### ORA-00091: LARGE_POOL_SIZE Parameter Not Set Correctly LARGE_POOL_SIZE参数设置不正确。这可能是由于参数设置超出允许范围或格式错误。 #### ORA-00092: LARGE_POOL_SIZE Less Than LARGE_POOL_MIN_ALLOC ...

    MSSQL性能监控SQL语句

    SELECT s2.dbid, (SELECT TOP 1 SUBSTRING(s2.text, statement_start_offset/2 + 1, ((CASE WHEN statement_end_offset = -1 THEN (LEN(CONVERT(nvarchar(max), s2.text)) * 2) ELSE statement_end_offset END) ...

    SQL2000只有数据库文件没有日志文件的附加方法

    update sysdatabases set status=-32768 where dbid=DB_ID('test') G. 执行真正的恢复操作,重建数据库日志文件: dbcc rebuild_log('test','C:\Program Files\Microsoft SQL Server\MSSQL\Data\test_log.ldf') H...

    jbpm表结构说明.doc

    DBID_是主键,CLASS_表示执行对象的类,ACTIVITYNAME_是当前活动的名称,PROCDEFID_是流程定义ID,HASVARS_表示是否有变量,NAME_和KEY_是流程实例的名称和键,ID_是唯一标识符,STATE_是执行状态,其余字段涉及执行...

    数据库设计文档(不完全)

    1. **JBPM4_LOB**:这个表存储流程模板,包括流程模版标识(DBID_)、发布XML模板的名称(NAME_)、版本(DBVERSION_)以及模板内容(BLOB_VALUE_)。DEPLOYMENT_字段作为外键指向流程部署表,用于关联特定的流程实例。 2. ...

    AWR报告手动配置

    SELECT * FROM dba_hist_wr_control; ``` 其中`DBID`表示数据库的唯一标识符;`SNAP_INTERVAL`代表每次快照间隔的时间;`RETENTION`则表示保留快照的时间长度;而`TOPNSQL`参数控制着系统保留的TOP SQL语句数量。 ...

    oracle错误代码大全

    #### ORA-00091: LARGE_POOL_SIZE not set - **解释**: LARGE_POOL_SIZE未设置。 - **解决方案**: 设置LARGE_POOL_SIZE。 #### ORA-00092: LARGE_POOL_SIZE less than LARGE_POOL_MIN_ALLOC - **解释**: LARGE_...

    经典SQL语句大全

    set @sql=’select top’+str(@end-@start+1)+’+from T where rid not in(select top’+str(@str-1)+’Rid from T where Rid>-1)’ exec sp_executesql @sql 注意:在top后不能直接跟一个变量,所以在实际应用中...

    Ajax请求发送成功但不进success的解决方法

    1.情况描述:ajax发送成功,后台... data : {'dbId':node.dbId,'viewId':node.id,'date':new Date()}, url : ${ctp}/ViewOperate/ShowViewSql, dataType : json, success : function(data){ console.log(data); l

Global site tag (gtag.js) - Google Analytics