Illegal pattern character 'i' 解决问题

  1 java.lang.IllegalArgumentException: Illegal pattern character 'i'
  2     at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:768)
  3     at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:575)
  4     at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:500)
  5     at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:475)
  6     at com.yf.daoImpl.Publish_InfoDaoImpl.queryByPage(Publish_InfoDaoImpl.java:22)
  7     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  8     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  9     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 10 
 11     at java.lang.reflect.Method.invoke(Method.java:597)
 12     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
 13     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
 14     at com.sun.proxy.$Proxy18.queryByPage(Unknown Source)
 15     at com.yf.serviceImpl.Publish_InfoServiceImpl.queryForPage(Publish_InfoServiceImpl.java:63)
 16     at com.yf.Action.InfoAction.list(InfoAction.java:61)
 17     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 18 
 19     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 20     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 21     at java.lang.reflect.Method.invoke(Method.java:597)
 22     at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:870)
 23     at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1293)
 24     at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
 25     at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
 26     at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
 27     at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1369)
 28     at ognl.ASTMethod.getValueBody(ASTMethod.java:90)
 29     at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
 30     at ognl.SimpleNode.getValue(SimpleNode.java:258)
 31     at ognl.Ognl.getValue(Ognl.java:494)
 32     at ognl.Ognl.getValue(Ognl.java:458)
 33     at com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.java:309)
 34     at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:340)
 35     at com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:307)
 36     at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:423)
 37     at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:287)
 38     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:250)
 39     at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
 40     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 41     at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
 42     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 43     at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
 44 
 45     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 46     at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
 47     at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 48     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 49     at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
 50 
 51     at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)
 52     at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 53     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 54     at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
 55     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 56     at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
 57     at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 58     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 59     at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
 60     at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 61     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 62     at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
 63     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 64     at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
 65     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 66     at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)
 67     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 68     at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
 69 
 70     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 71     at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
 72     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 73     at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
 74     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 75     at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
 76 
 77     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 78     at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
 79     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 80     at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
 81     at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 82     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 83 
 84     at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
 85     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 86     at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
 87     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 88     at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
 89     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 90     at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
 91     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 92     at com.yf.interceptor.LoginedCheckInterceptor.intercept(LoginedCheckInterceptor.java:34)
 93     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
 94     at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
 95     at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)
 96     at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
 97     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
 98     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 99     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
100     at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
101     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
102     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
103     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
104     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
105     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
106     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
107     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
108     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
109     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
110     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
111     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
112     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
113     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
114     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
115     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
116     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
117     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
118     at java.lang.Thread.run(Thread.java:662)

出现这个错误的时候,是因为本人代码在书写的时候 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mi:ss"); 没有细心

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mi:ss"); 改成SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

就好了

posted @ 2016-08-30 10:56  Mr.Moon  阅读(16628)  评论(1编辑  收藏  举报