当前位置: 代码迷 >> Sql Server >> TDS 协议流无效,请问解决办法
  详细解决方案

TDS 协议流无效,请问解决办法

热度:48   发布时间:2016-04-24 19:27:02.0
TDS 协议流无效,请教解决方法
严重: TDSReader@6f0f (ConnectionID:28) got unexpected value in TDS response at offset:7992
[2013-12-28 16:31:00,078]-ERROR (JDBCExceptionReporter.java:101)|TDS 协议流无效。
[2013-12-28 16:31:00,421]-ERROR (CommonsLogger.java:27)|Hibernate operation: could not load an entity: [com.ahqx.zhgl.common.db.genmodel.LineInfoPO#68]; uncategorized SQLException for SQL [select lineinfopo0_.ID as ID15_0_, lineinfopo0_.CarID as CarID15_0_, lineinfopo0_.distance as distance15_0_, lineinfopo0_.stime as stime15_0_, lineinfopo0_.etime as etime15_0_, lineinfopo0_.geo as geo15_0_ from dbo.lineinfo lineinfopo0_ where lineinfopo0_.ID=?]; SQL state [null]; error code [0]; TDS 协议流无效。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: TDS 协议流无效。
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not load an entity: [com.ahqx.zhgl.common.db.genmodel.LineInfoPO#68]; uncategorized SQLException for SQL [select lineinfopo0_.ID as ID15_0_, lineinfopo0_.CarID as CarID15_0_, lineinfopo0_.distance as distance15_0_, lineinfopo0_.stime as stime15_0_, lineinfopo0_.etime as etime15_0_, lineinfopo0_.geo as geo15_0_ from dbo.lineinfo lineinfopo0_ where lineinfopo0_.ID=?]; SQL state [null]; error code [0]; TDS 协议流无效。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: TDS 协议流无效。




调用的java内部方法是
/**
 * 转换点
 * @param x gps真实点x
 * @param y gps真实点y
 * @return 点对象
 */
public static Point getXY(String x,String y){
String lng = x.substring(0, x.indexOf(".")+3);
String lat = y.substring(0, y.indexOf(".")+3);
List listLNGLAT = map.get(lng+","+lat);
if(listLNGLAT==null){
String formatLNGLAT = "select offsetlng,offsetlat from offset_bd where lng like '"+lng+"%' and lat like '"+lat+"%'";
listLNGLAT = AppImpl.getMe().getAllServicesCommon().getCommonOrgServiceIntf().getAllDaos().getCarPointDao().findListBySql(formatLNGLAT, null);
map.put(lng+","+lat, listLNGLAT);
}
if(listLNGLAT.size()>0){
Object [] obj = (Object[])listLNGLAT.get(0);
try {
Double lngt = Double.parseDouble(x)+Double.parseDouble(obj[0].toString());
Double latt = Double.parseDouble(y)+Double.parseDouble(obj[1].toString());
return new Point(lngt.toString(), latt.toString());
} catch (NumberFormatException e) {
e.printStackTrace();
}
}
return null;
}


数据库是sql server2000,表中有字段是text类型,数据量很大。

------解决方案--------------------
建议先检查一下SQL2000 SP4补丁安装了没?

------解决方案--------------------
引用:
Quote: 引用:

建议先检查一下SQL2000 SP4补丁安装了没?

sp4补丁安装了,这条数据数据量小的话没问题,但是数据量大了就出问题了


这个tds是sql server用来传输 数据的一种 分装协议,这种应该是sql server底层的问题,之前也看到有人提出这个问题,也有可能和你的网络有关系
  相关解决方案