都市供求信息网
发表在JavaWeb图书答疑 2013-07-16
是否精华
版块置顶:
都市供求信息网现在可以运行了,但是好像数据库读取出现问题了。请问是什么问题?


select * from tb_type order by type_sign
doPstm()方法出错!
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。参数 1 (""): 数据类型 0x38 未知。
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.execute(Unknown Source)
at com.yxq.dao.DB.doPstm(DB.java:53)
at com.yxq.dao.OpDB.OpGetListBox(OpDB.java:21)
at com.yxq.action.IndexAction.<clinit>(IndexAction.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)

at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:123)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:154)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:275)
at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:365)
at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)

at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:83)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:74)
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)

at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation.  Statement not in an executed state.
OpGetListBox()方法查询失败!
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.validateInExecutedState(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getResultSet(Unknown Source)
at com.yxq.dao.DB.getRs(DB.java:63)
at com.yxq.dao.OpDB.OpGetListBox(OpDB.java:23)
at com.yxq.action.IndexAction.<clinit>(IndexAction.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)[img src=null/img]
分享到:
精彩评论 2
吴勤_mrkj
学分:0 LV1
TA的每日心情
无聊
2020-09-11 15:46:52
2013-07-16
沙发
使用的mssql 2008数据库。
无语_mrkj
学分:3155 LV11
2013-07-22
板凳
您用的数据库驱动是SQL Server 2008的一个文件的,还是2000的3个文件的呢?从异常信息看,您用的驱动好像是2000的(][SQLServer 2000 Driver for JDBC)。如果您是2008的,那么请使用一个文件的数据库驱动包。
首页上一页 1 下一页尾页 2 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照