ajax的异步操作问题
Struts Problem Report
Struts has detected an unhandled exception:
Messages: Bad format for Timestamp '??' in column 4.
Cannot convert value 'ç?·' from column 4 to TIMESTAMP.
Hibernate operation: could not execute query; uncategorized SQLException for SQL [select elecsystem0_.seqID as seqID2_, elecsystem0_.keyword as keyword2_, elecsystem0_.ddlCode as ddlCode2_, elecsystem0_.ddlName as ddlName2_ from Elec_SystemDDL elecsystem0_ where 1=1 and elecsystem0_.keyword=? order by elecsystem0_.ddlCode asc]; SQL state [S1009]; error code [0]; Cannot convert value 'ç?·' from column 4 to TIMESTAMP.; nested exception is java.sql.SQLException: Cannot convert value 'ç?·' from column 4 to TIMESTAMP.
File: com/mysql/jdbc/ResultSetRow.java
Line number: 1,310
--------------------------------------------
Stacktraces
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select elecsystem0_.seqID as seqID2_, elecsystem0_.keyword as keyword2_, elecsystem0_.ddlCode as ddlCode2_, elecsystem0_.ddlName as ddlName2_ from Elec_SystemDDL elecsystem0_ where 1=1 and elecsystem0_.keyword=? order by elecsystem0_.ddlCode asc]; SQL state [S1009]; error code [0]; Cannot convert value 'ç?·' from column 4 to TIMESTAMP.; nested exception is java.sql.SQLException: Cannot convert value 'ç?·' from column 4 to TIMESTAMP.
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)
org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
cn.evan.elec.dao.impl.CommonDaoImpl.findCollectionByConditionNoPage(CommonDaoImpl.java:93)
cn.evan.elec.service.impl.ElecSystemDDLServiceImpl.findSystemDDLListByKeyword(ElecSystemDDLServiceImpl.java:72)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy11.findSystemDDLListByKeyword(Unknown Source)
cn.evan.elec.web.action.ElecSystemDDLAction.edit(ElecSystemDDLAction.java:56)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
--------------------------------------------
You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set:
struts.devMode=false
in your WEB-INF/classes/struts.properties file.
这个问题是怎么回事啊?我把源码看了两遍还是没找出来... 大神帮帮忙
[解决办法]
两点在这里:
Messages: Bad format for Timestamp '??' in column 4.
Cannot convert value 'ç?·' from column 4 to TIMESTAMP.
Hibernate operation: could not execute query; uncategorized SQLException for SQL [select elecsystem0_.seqID as seqID2_, elecsystem0_.keyword as keyword2_, elecsystem0_.ddlCode as ddlCode2_, elecsystem0_.ddlName as ddlName2_ from Elec_SystemDDL elecsystem0_ where 1=1 and elecsystem0_.keyword=? order by elecsystem0_.ddlCode asc]; SQL state [S1009]; error code [0]; Cannot convert value 'ç?·' from column 4 to TIMESTAMP.; nested exception is java.sql.SQLException: Cannot convert value 'ç?·' from column 4 to TIMESTAMP.
乱码呢。。。哥们。本来是要转换为时间格式,可是你给他'ç?·'这样的一个东东,他怎么转换?
[解决办法]
这个错跟ajax没关系。
[解决办法]
跟Ajax没有直接关系,先从这两个地方入手:
cn.evan.elec.dao.impl.CommonDaoImpl.findCollectionByConditionNoPage(CommonDaoImpl.java:93)
cn.evan.elec.service.impl.ElecSystemDDLServiceImpl.findSystemDDLListByKeyword(ElecSystemDDLServiceImpl.java:72)
把里面的参数都显示出来看看,应该存在乱码,当然很可能是前台页面提交过来的数据就是乱码。
[解决办法]
看看是不是数据类型不对,或者是乱码了
[解决办法]