标签:dialect does not support identity key generation
异常信息:
10:13:48,540 DEBUG JSONUtil:72 - [JSON]{"exception":{"cause":{"cause":{"cause":{"cause":{"cause":{"cause":{"cause": {"cause":null,"localizedMessage":" {"className":"com.opensymphony.xwork2.interceptor.PrepareInterceptor","fileName":"PrepareInterceptor.java","lineNumber":171,"methodName":"doIntercept","nativeMethod":false} ,{"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false} ,{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.I18nInterceptor","fileName":"I18nInterceptor.java","lineNumber":139,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.struts2.interceptor.ServletConfigInterceptor","fileName":"ServletConfigInterceptor.java","lineNumber":164,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.AliasInterceptor","fileName":"AliasInterceptor.java","lineNumber":193,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor","fileName":"ExceptionMappingInterceptor.java","lineNumber":189,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.struts2.impl.StrutsActionProxy","fileName":"StrutsActionProxy.java","lineNumber":54,"methodName":"execute","nativeMethod":false}, {"className":"org.apache.struts2.dispatcher.Dispatcher","fileName":"Dispatcher.java","lineNumber":562,"methodName":"serviceAction","nativeMethod":false}, {"className":"org.apache.struts2.dispatcher.ng.ExecuteOperations","fileName":"ExecuteOperations.java","lineNumber":77,"methodName":"executeAction","nativeMethod":false}, {"className":"org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter","fileName":"StrutsPrepareAndExecuteFilter.java","lineNumber":99,"methodName":"doFilter","nativeMethod":false}, {"className":"org.apache.catalina.core.ApplicationFilterChain","fileName":"ApplicationFilterChain.java","lineNumber":241,"methodName":"internalDoFilter","nativeMethod":false}, {"className":"org.apache.catalina.core.ApplicationFilterChain","fileName":"ApplicationFilterChain.java","lineNumber":208,"methodName":"doFilter","nativeMethod":false}, {"className":"org.apache.catalina.core.StandardWrapperValve","fileName":"StandardWrapperValve.java","lineNumber":220,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.core.StandardContextValve","fileName":"StandardContextValve.java","lineNumber":122,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.authenticator.AuthenticatorBase","fileName":"AuthenticatorBase.java","lineNumber":501,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.core.StandardHostValve","fileName":"StandardHostValve.java","lineNumber":171,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.valves.ErrorReportValve","fileName":"ErrorReportValve.java","lineNumber":102,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.valves.AccessLogValve","fileName":"AccessLogValve.java","lineNumber":950,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.core.StandardEngineValve","fileName":"StandardEngineValve.java","lineNumber":116,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.connector.CoyoteAdapter","fileName":"CoyoteAdapter.java","lineNumber":408,"methodName":"service","nativeMethod":false}, {"className":"org.apache.coyote.http11.AbstractHttp11Processor","fileName":"AbstractHttp11Processor.java","lineNumber":1040,"methodName":"process","nativeMethod":false}, {"className":"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler","fileName":"AbstractProtocol.java","lineNumber":607,"methodName":"process","nativeMethod":false}, {"className":"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor","fileName":"AprEndpoint.java","lineNumber":2442,"methodName":"doRun","nativeMethod":false} ,{"className":"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor","fileName":"AprEndpoint.java","lineNumber":2431,"methodName":"run","nativeMethod":false}, {"className":"java.util.concurrent.ThreadPoolExecutor$Worker","fileName":"ThreadPoolExecutor.java","lineNumber":895,"methodName":"runTask","nativeMethod":false}, {"className":"java.util.concurrent.ThreadPoolExecutor$Worker","fileName":"ThreadPoolExecutor.java","lineNumber":918,"methodName":"run","nativeMethod":false}, {"className":"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable","fileName":"TaskThread.java","lineNumber":61,"methodName":"run","nativeMethod":false}, {"className":"java.lang.Thread","fileName":"Thread.java","lineNumber":662,"methodName":"run","nativeMethod":false}], "targetException":{"cause":null,"localizedMessage":"Dialect does not support identity key generation","message":"Dialect does not support identity key generation", "stackTrace":[{"className":"org.hibernate.dialect.Dialect","fileName":"Dialect.java","lineNumber":549,"methodName":"getIdentitySelectString","nativeMethod":false}, {"className":"org.hibernate.dialect.Dialect","fileName":"Dialect.java","lineNumber":538,"methodName":"getIdentitySelectString","nativeMethod":false}, {"className":"org.hibernate.persister.entity.AbstractEntityPersister","fileName":"AbstractEntityPersister.java","lineNumber":2181,"methodName":"getIdentitySelectString","nativeMethod":false}, {"className":"sun.reflect.NativeMethodAccessorImpl","fileName":"NativeMethodAccessorImpl.java","lineNumber":-2,"methodName":"invoke0","nativeMethod":true}, {"className":"sun.reflect.NativeMethodAccessorImpl","fileName":"NativeMethodAccessorImpl.java","lineNumber":39,"methodName":"invoke","nativeMethod":false} ,{"className":"sun.reflect.DelegatingMethodAccessorImpl","fileName":"DelegatingMethodAccessorImpl.java","lineNumber":25,"methodName":"invoke","nativeMethod":false}, {"className":"java.lang.reflect.Method","fileName":"Method.java","lineNumber":597,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":226,"methodName":"bean","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false} ,{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false} ,{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":436,"methodName":"map","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":154,"methodName":"process","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false} ,{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false} ,{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false}, {"{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false} ,{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":102,"methodName":"write","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONUtil","fileName":"JSONUtil.java","lineNumber":116,"methodName":"serialize","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONResult","fileName":"JSONResult.java","lineNumber":202,"methodName":"createJSONString","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONResult","fileName":"JSONResult.java","lineNumber":176,"methodName":"execute","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":371,"methodName":"executeResult","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":275,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.struts2.interceptor.DeprecationInterceptor","fileName":"DeprecationInterceptor.java","lineNumber":41,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.struts2.interceptor.debugging.DebuggingInterceptor","fileName":"DebuggingInterceptor.java","lineNumber":256,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor","fileName":"DefaultWorkflowInterceptor.java","lineNumber":167,"methodName":"doIntercept","nativeMethod":false} ,{"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false}, {{"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.StaticParametersInterceptor","fileName":"StaticParametersInterceptor.java","lineNumber":191,"methodName":"intercept","nativeMethod":false} ,{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false} ,{"className":"org.apache.struts2.interceptor.MultiselectInterceptor","fileName":"MultiselectInterceptor.java","lineNumber":73,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.CheckboxInterceptor","fileName":"CheckboxInterceptor.java","lineNumber":91,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.FileUploadInterceptor","fileName":"FileUploadInterceptor.java","lineNumber":252,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor","fileName":"ModelDrivenInterceptor.java","lineNumber":100,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor","fileName":"ScopedModelDrivenInterceptor.java","lineNumber":141,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.ChainingInterceptor","fileName":"ChainingInterceptor.java","lineNumber":145,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.PrepareInterceptor","fileName":"PrepareInterceptor.java","lineNumber":171,"methodName":"doIntercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.I18nInterceptor","fileName":"I18nInterceptor.java","lineNumber":139,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.ServletConfigInterceptor","fileName":"ServletConfigInterceptor.java","lineNumber":164,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.AliasInterceptor","fileName":"AliasInterceptor.java","lineNumber":193,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor","fileName":"ExceptionMappingInterceptor.java","lineNumber":189,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.impl.StrutsActionProxy","fileName":"StrutsActionProxy.java","lineNumber":54,"methodName":"execute","nativeMethod":false}, {"className":"org.apache.struts2.dispatcher.Dispatcher","fileName":"Dispatcher.java","lineNumber":562,"methodName":"serviceAction","nativeMethod":false},{"className":"org.apache.struts2.dispatcher.ng.ExecuteOperations","fileName":"ExecuteOperations.java","lineNumber":77,"methodName":"executeAction","nativeMethod":false},{"className":"org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter","fileName":"StrutsPrepareAndExecuteFilter.java","lineNumber":99,"methodName":"doFilter","nativeMethod":false},{"className":"org.apache.catalina.core.ApplicationFilterChain","fileName":"ApplicationFilterChain.java","lineNumber":241,"methodName":"internalDoFilter","nativeMethod":false},{"className":"org.apache.catalina.core.ApplicationFilterChain","fileName":"ApplicationFilterChain.java","lineNumber":208,"methodName":"doFilter","nativeMethod":false},{"className":"org.apache.catalina.core.StandardWrapperValve","fileName":"StandardWrapperValve.java","lineNumber":220,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.catalina.core.StandardContextValve","fileName":"StandardContextValve.java","lineNumber":122,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.catalina.authenticator.AuthenticatorBase","fileName":"AuthenticatorBase.java","lineNumber":501,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.core.StandardHostValve","fileName":"StandardHostValve.java","lineNumber":171,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.catalina.valves.ErrorReportValve","fileName":"ErrorReportValve.java","lineNumber":102,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.catalina.valves.AccessLogValve","fileName":"AccessLogValve.java","lineNumber":950,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.catalina.core.StandardEngineValve","fileName":"StandardEngineValve.java","lineNumber":116,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.catalina.connector.CoyoteAdapter","fileName":"CoyoteAdapter.java","lineNumber":408,"methodName":"service","nativeMethod":false},{"className":"org.apache.coyote.http11.AbstractHttp11Processor","fileName":"AbstractHttp11Processor.java","lineNumber":1040,"methodName":"process","nativeMethod":false},{"className":"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler","fileName":"AbstractProtocol.java","lineNumber":607,"methodName":"process","nativeMethod":false},{"className":"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor","fileName":"AprEndpoint.java","lineNumber":2442,"methodName":"doRun","nativeMethod":false},{"className":"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor","fileName":"AprEndpoint.java","lineNumber":2431,"methodName":"run","nativeMethod":false},{"className":"java.util.concurrent.ThreadPoolExecutor$Worker","fileName":"ThreadPoolExecutor.java","lineNumber":895,"methodName":"runTask","nativeMethod":false}, {"className":"java.util.concurrent.ThreadPoolExecutor$Worker","fileName":"ThreadPoolExecutor.java","lineNumber":918,"methodName":"run","nativeMethod":false},{"className":"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable","fileName":"TaskThread.java","lineNumber":61,"methodName":"run","nativeMethod":false},{"className":"java.lang.Thread","fileName":"Thread.java","lineNumber":662,"methodName":"run","nativeMethod":false}]}},"localizedMessage":"java.lang.reflect.InvocationTargetException","message":"java.lang.reflect.InvocationTargetException","stackTrace":[{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":246,"methodName":"bean","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":436,"methodName":"map","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":154,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":390,"methodName":"add","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":231,"methodName":"bean","nativeMethod":false}, {"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":178,"methodName":"processCustom","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":168,"methodName":"process","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":134,"methodName":"value","nativeMethod":false},{"className":"org.apache.struts2.json.JSONWriter","fileName":"JSONWriter.java","lineNumber":102,"methodName":"write","nativeMethod":false},{"className":"org.apache.struts2.json.JSONUtil","fileName":"JSONUtil.java","lineNumber":116,"methodName":"serialize","nativeMethod":false},{"className":"org.apache.struts2.json.JSONResult","fileName":"JSONResult.java","lineNumber":202,"methodName":"createJSONString","nativeMethod":false},{"className":"org.apache.struts2.json.JSONResult","fileName":"JSONResult.java","lineNumber":176,"methodName":"execute","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":371,"methodName":"executeResult","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":275,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.DeprecationInterceptor","fileName":"DeprecationInterceptor.java","lineNumber":41,"methodName":"intercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.debugging.DebuggingInterceptor","fileName":"DebuggingInterceptor.java","lineNumber":256,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor","fileName":"DefaultWorkflowInterceptor.java","lineNumber":167,"methodName":"doIntercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.validator.ValidationInterceptor","fileName":"ValidationInterceptor.java","lineNumber":265,"methodName":"doIntercept","nativeMethod":false},{"className":"org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor","fileName":"AnnotationValidationInterceptor.java","lineNumber":68,"methodName":"doIntercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor","fileName":"ConversionErrorInterceptor.java","lineNumber":138,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.ParametersInterceptor","fileName":"ParametersInterceptor.java","lineNumber":254,"methodName":"doIntercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.ParametersInterceptor","fileName":"ParametersInterceptor.java","lineNumber":254,"methodName":"doIntercept","nativeMethod":false}, {"className":"com.opensymphony.xwork2.interceptor.MethodFilterInterceptor","fileName":"MethodFilterInterceptor.java","lineNumber":98,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"com.opensymphony.xwork2.interceptor.StaticParametersInterceptor","fileName":"StaticParametersInterceptor.java","lineNumber":191,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.MultiselectInterceptor","fileName":"MultiselectInterceptor.java","lineNumber":73,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.CheckboxInterceptor","fileName":"CheckboxInterceptor.java","lineNumber":91,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false},{"className":"org.apache.struts2.interceptor.FileUploadInterceptor","fileName":"FileUploadInterceptor.java","lineNumber":252,"methodName":"intercept","nativeMethod":false},{"className":"com.opensymphony.xwork2.DefaultActionInvocation","fileName":"DefaultActionInvocation.java","lineNumber":246,"methodName":"invoke","nativeMethod":false}, {"className":"org.apache.catalina.connector.CoyoteAdapter","fileName":"CoyoteAdapter.java","lineNumber":408,"methodName":"service","nativeMethod":false},{"className":"org.apache.coyote.http11.AbstractHttp11Processor","fileName":"AbstractHttp11Processor.java","lineNumber":1040,"methodName":"process","nativeMethod":false},{"className":"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler","fileName":"AbstractProtocol.java","lineNumber":607,"methodName":"process","nativeMethod":false},{"className":"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor","fileName":"AprEndpoint.java","lineNumber":2442,"methodName":"doRun","nativeMethod":false},{"className":"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor","fileName":"AprEndpoint.java","lineNumber":2431,"methodName":"run","nativeMethod":false},{"className":"java.util.concurrent.ThreadPoolExecutor$Worker","fileName":"ThreadPoolExecutor.java","lineNumber":895,"methodName":"runTask","nativeMethod":false},{"className":"java.util.concurrent.ThreadPoolExecutor$Worker","fileName":"ThreadPoolExecutor.java","lineNumber":918,"methodName":"run","nativeMethod":false},{"className":"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable","fileName":"TaskThread.java","lineNumber":61,"methodName":"run","nativeMethod":false},{"className":"java.lang.Thread","fileName":"Thread.java","lineNumber":662,"methodName":"run","nativeMethod":false}]},"localizedMessage":"org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException","message":"org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException",
以上是异常信息
-------------------------------------------------------------------------------------------------------
<script type="text/javascript" src="js/jquery-1.7.2.js"></script> <script type="text/javascript" > $(function(){ $("#rname").blur(function(){ var rname=$(this).val(); $.ajax({ url:"user/checkname", data:"rname="+rname, type:"post", dataType:"text", success:function(data){ $("#span1").html($.parseJSON(data).msg); }, error:function(msg){ $("#span1").html($.parseJSON(data).msg); } }); }); } ); </script>
上面为前端jsp页面Json数据的传输和接收
--------------------------------------------------------
public class UsersAction extends ActionSupport{ private UsersService ; private Users ; private int ; Map<String,Object> session=ActionContext.getContext().getSession(); private String rname; private String ; public String checkname() { int i=us.findName(rname); if(i==1){ msg="用户名已经存在"; return "success"; }else{ msg="用户名正确"; return "error"; } } public UsersService getUs() { return us; } public void setUs(UsersService us) { this.us = us; } public Users getUsers() { return users; } public void setUsers(Users users) { this.users = users; } public int getPermission() { return permission; } public void setPermission(int permission) { this.permission = permission; } public String getRname() { return rname; } public void setRname(String rname) { this.rname = rname; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } }
简单的将实现的验证Action后台的数据粘在这里,具体的就不多复制
--------------------------------------------------------
struts的配置文件内容:
<action name="checkname" class="action.UsersAction" method="checkname"> <result name="success" type="json"> </result> <result name="error" type="json"></result> <interceptor-ref name="defaultStack"></interceptor-ref> </action>
打算获取文件所有的属性的值
------------------------------------------------------
实体类的配置文件:
<hibernate-mapping package="entity"> <class name="entity.Users" schema="SCOTT" table="USER1"> <id name="id" type="java.lang.Integer"> <generator > </generator> </id> //其他配置省略
使用的<generator class="assigned"></generator>属性为assigned
开始查找以为是实体类配置问题,按网上有的说法是:<generator class="assigned"/>中的assigned为identity 可是检查半天也不是,而且配置方言也没有问题,怀疑过是否是dao的底层实现类造成的,用debug跟半天也没发现异常出现,一直执行到action返回"success"后,myEclipse出现死机,猛然蹦出开头复制的异常.据此推测就是struts2的配置出现的问题,后来更改的:
<action name="checkname" class="action.UsersAction" method="checkname"> <result name="success" type="json"> </result> <result name="error" type="json"> </result> <interceptor-ref name="defaultStack"></interceptor-ref> </action>
将里面的参数进行细化加上了name="includeProperties"可以获取msg的值,单个获取us,users,rname,permission均可以将其传到前端的jsp页面 但是整体获得却不可以
由此可见对于获取特定的信息时明确所获得的数据进行限制
本文出自 “channyb” 博客,请务必保留此出处http://12298162.blog.51cto.com/12288162/1875694
标签:dialect does not support identity key generation
原文地址:http://12298162.blog.51cto.com/12288162/1875694