JPA(hibernate)+struts2+spring+mysql,本机不报错,服务器上部署一段时间后报错。异常见下,在线等,
java.sql.SQLException:Unknowncharactersetindexforfield'276'receivedfromserver.com.mys...
java.sql.SQLException: Unknown character set index for field '276' received from server.
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
com.mysql.jdbc.ConnectionImpl.getCharsetNameForIndex(ConnectionImpl.java:2885)
com.mysql.jdbc.Field.<init>(Field.java:200)
com.mysql.jdbc.MysqlIO.unpackField(MysqlIO.java:786)
com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:417)
com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2631)
com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1800)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2221)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
org.hibernate.loader.Loader.getResultSet(Loader.java:1812)
org.hibernate.loader.Loader.doQuery(Loader.java:697)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
org.hibernate.loader.Loader.doList(Loader.java:2232)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
org.hibernate.loader.Loader.list(Loader.java:2124)
附UML图,这个配置没有循环嘛。 展开
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
com.mysql.jdbc.ConnectionImpl.getCharsetNameForIndex(ConnectionImpl.java:2885)
com.mysql.jdbc.Field.<init>(Field.java:200)
com.mysql.jdbc.MysqlIO.unpackField(MysqlIO.java:786)
com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:417)
com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2631)
com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1800)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2221)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
org.hibernate.loader.Loader.getResultSet(Loader.java:1812)
org.hibernate.loader.Loader.doQuery(Loader.java:697)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
org.hibernate.loader.Loader.doList(Loader.java:2232)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
org.hibernate.loader.Loader.list(Loader.java:2124)
附UML图,这个配置没有循环嘛。 展开
4个回答
展开全部
跟别的没关系,如果不是sql语句有问题,就是数据库值有问题 或者是操作传入的值有问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在VB6.0中查询Access数据库多字段并加条件查询,代码如下:
Private Sub Command1_Click()
strfilename = "E:\XXZL\tEST.mdb"
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.CursorLocation = adUseClient
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strfilename & ";Persist Security Info=False"
cn.Open ConnectionString
StrSQL = "select DD,BB,CC,AA from RES where AA= '" & Text1.Text & "'"
rs.Open StrSQL, cn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
End Sub
------------------------------
Private Sub Command1_Click()
strfilename = "E:\XXZL\tEST.mdb"
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.CursorLocation = adUseClient
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strfilename & ";Persist Security Info=False"
cn.Open ConnectionString
StrSQL = "select DD,BB,CC,AA from RES where AA= '" & Text1.Text & "'"
rs.Open StrSQL, cn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
End Sub
------------------------------
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我i看了一下是不是字符的问题啊?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询