Execute and Wait Interceptor 的使用

原文链接:http://hi.baidu.com/zhuyoulong/blog/item/aeb2f9edc55daa4d78f055e1.html

Execute and Wait Interceptor 的使用

在引入了webwork-default.xml的前提下

xwork.xml 配置 :

1、增加拦截器
     
       <interceptor-ref name="execAndWait">
       <!-- 等待时间,执行时间没有超过此值,将不显示等待画面 (毫秒)-->
            <param name="delay">1000</param>
            <!-- 间隔检查时间,检查后台进程有没有执行完毕,如果完成了它就立刻返回,不用等到等待,用户不会看到等待画面 -->
            <param name="delaySleepInterval">50</param>
       </interceptor-ref>
   
      此拦截器必须放在所有拦截器的最后。     

2、增加result

       <result name="wait">wait.jsp</result>
  
       如果没有找到"wait"结果,WebWork会自动生成一个wait结果(\com\opensymphony\webwork\interceptor\wait.ftl).这个结果是用FreeMarker做的,所以需要Freemarker支持才能正常工作。如果你不想在程序中加入FreeMarker,那就必须自己实现一个wait结果。这一般来说是有必要的,因为默认的wait页面很简单。

3、Action实现SessionAware接口

       因为这个action将会以单独的线程执行,所以你不能用ActionContext,因为它是ThreadLocal.这也就是说如果你要访问session数据,你必须实现 SessionAware结构而不是调用ActionContext.getSesion() 。

       public interface SessionAware{
              public void setSession(Map map);
       }

       public abstract class AbsBasicAction extends ActionSupport implements SessionAware{
             
               /** 当前 Session */
              protected Map session ;

              public void setSession(Map session) {
                   this.session = session ;
              }
       }

4、实现 wait 结果 映射的 wait.jsp

       必须设置该页面的meta信息,每隔5秒,重新请求一次前面的action。
       <meta http-equiv="refresh" content="5;url="<ww:url includeParams="'all'" />">

RuntimeError Traceback (most recent call last) Cell In[9], line 12 10 for i_z in range(nu_z): 11 z = -75 + (300 / (nu_z-1)) * i_z ---> 12 session.tui.surface.point_surface(f"point_{i}",x,y,z) File ~\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py:342, in TUIMethod.__call__(self, *args, **kwargs) 341 def __call__(self, *args, **kwargs): --> 342 return PyMenu(self._service, self._version, self._mode, self._path).execute( 343 *args, **kwargs 344 ) File ~\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py:268, in PyMenu.execute(self, *args, **kwargs) 266 return self._service.execute_query(self._path, *args, **kwargs) 267 else: --> 268 return self._service.execute_command(self._path, *args, **kwargs) File ~\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py:179, in DatamodelService.execute_command(self, path, *args, **kwargs) 177 else: 178 _convert_value_to_gvalue(args, request.args.fields["tui_args"]) --> 179 return self._impl.execute_command(request) File ~\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py:89, in DatamodelServiceImpl.execute_command(self, request) 85 def execute_command( 86 self, request: DataModelProtoModule.ExecuteCommandRequest 87 ) -> DataModelProtoModule.ExecuteCommandResponse: 88 """ExecuteCommand RPC of DataModel service.""" ---> 89 return self._stub.ExecuteCommand(request, metadata=self._metadata) File ~\.conda\envs\fluent\Lib\site-packages\grpc\_interceptor.py:277, in _UnaryUnaryMultiCallable.__call__(self, request, timeout, metadata, credentials, wait_for_ready, compression) 268 def __call__( 269 self, 270 request: Any, (...) 275 compression: Optional[grpc.Compression] = None, 276 ) -> Any: --> 277 response, ignored_call = self._with_call( 278 request, 279 timeout=timeout, 280 metadata=metadata, 281 credentials=credentials, 282 wait_for_ready=wait_for_ready, 283 compression=compression, 284 ) 285 return response File ~\.conda\envs\fluent\Lib\site-packages\grpc\_interceptor.py:329, in _UnaryUnaryMultiCallable._with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression) 326 except Exception as exception: # pylint:disable=broad-except 327 return _FailureOutcome(exception, sys.exc_info()[2]) --> 329 call = self._interceptor.intercept_unary_unary( 330 continuation, client_call_details, request 331 ) 332 return call.result(), call File ~\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\interceptors.py:172, in GrpcErrorInterceptor.intercept_unary_unary(self, continuation, client_call_details, request) 165 def intercept_unary_unary( 166 self, 167 continuation: Any, 168 client_call_details: grpc.ClientCallDetails, 169 request: Any, 170 ) -> Any: 171 """Intercept unary-unary call for error state checking.""" --> 172 return self._intercept_call(continuation, client_call_details, request) File ~\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\interceptors.py:162, in GrpcErrorInterceptor._intercept_call(self, continuation, client_call_details, request) 158 new_ex = new_ex_cls( 159 ex.details() if isinstance(ex, grpc.RpcError) else str(ex) 160 ) 161 new_ex.__context__ = ex --> 162 raise new_ex from None 163 return response RuntimeError: wta(1st) to symbol->string Error Object: #f
07-08
14:13:40.801 [ForkJoinPool.commonPool-worker-3] ERROR druid.sql.Statement - [statementLogError,148] - {conn-10003, pstmt-20025} execute error. INSERT INTO ai_event_payload(send_time, ability, event_id, src_index, src_type, src_name, event_type, happen_time, stop_time, location_name, handle_status, event_level, remark, first_remind_time, last_remind_time, remind_count, two_remind_time,pic_uri, svr_index_code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?, ?,?,?) on duplicate key update send_time = VALUES (send_time), ability = VALUES (ability), src_index = VALUES (src_index), src_type = VALUES (src_type), src_name = VALUES (src_name), event_type = VALUES (event_type), happen_time = VALUES (happen_time), stop_time = VALUES (stop_time), location_name = VALUES (location_name), handle_status = VALUES (handle_status), event_level = VALUES (event_level), remark = VALUES (remark), first_remind_time = VALUES (first_remind_time), last_remind_time = VALUES (last_remind_time), remind_count = VALUES (remind_count), two_remind_time = VALUES (two_remind_time), pic_uri = VALUES (pic_uri), svr_index_code = VALUES (svr_index_code) com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:124) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3446) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:152) at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:483) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64) at com.sun.proxy.$Proxy255.update(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) at com.sun.proxy.$Proxy138.insert(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) at com.sun.proxy.$Proxy189.insertEventPayload(Unknown Source) at com.gcvcloud.interfaceservice.service.HaiKangService.processSingleEvent(HaiKangService.java:154) at com.gcvcloud.interfaceservice.service.HaiKangService.processWarnings(HaiKangService.java:62) at com.gcvcloud.interfaceservice.service.HaiKangService$$FastClassBySpringCGLIB$$f94d55fb.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at com.gcvcloud.interfaceservice.service.HaiKangService$$EnhancerBySpringCGLIB$$cf150d9b.processWarnings(<generated>) at com.gcvcloud.interfaceservice.controller.WarningNotificationController.lambda$handleEvent$0(WarningNotificationController.java:48) at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1626) at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) at java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 14:13:40.801 [ForkJoinPool.commonPool-worker-1] ERROR druid.sql.Statement - [statementLogError,148] - {conn-10005, pstmt-20041} execute error. INSERT INTO ai_event_payload(send_time, ability, event_id, src_index, src_type, src_name, event_type, happen_time, stop_time, location_name, handle_status, event_level, remark, first_remind_time, last_remind_time, remind_count, two_remind_time,pic_uri, svr_index_code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?, ?,?,?) on duplicate key update send_time = VALUES (send_time), ability = VALUES (ability), src_index = VALUES (src_index), src_type = VALUES (src_type), src_name = VALUES (src_name), event_type = VALUES (event_type), happen_time = VALUES (happen_time), stop_time = VALUES (stop_time), location_name = VALUES (location_name), handle_status = VALUES (handle_status), event_level = VALUES (event_level), remark = VALUES (remark), first_remind_time = VALUES (first_remind_time), last_remind_time = VALUES (last_remind_time), remind_count = VALUES (remind_count), two_remind_time = VALUES (two_remind_time), pic_uri = VALUES (pic_uri), svr_index_code = VALUES (svr_index_code) com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:124) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3446) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:152) at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:483) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64) at com.sun.proxy.$Proxy255.update(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) at com.sun.proxy.$Proxy138.insert(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) at com.sun.proxy.$Proxy189.insertEventPayload(Unknown Source) at com.gcvcloud.interfaceservice.service.HaiKangService.processSingleEvent(HaiKangService.java:154) at com.gcvcloud.interfaceservice.service.HaiKangService.processWarnings(HaiKangService.java:62) at com.gcvcloud.interfaceservice.service.HaiKangService$$FastClassBySpringCGLIB$$f94d55fb.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at com.gcvcloud.interfaceservice.service.HaiKangService$$EnhancerBySpringCGLIB$$cf150d9b.processWarnings(<generated>) at com.gcvcloud.interfaceservice.controller.WarningNotificationController.lambda$handleEvent$0(WarningNotificationController.java:48) at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1626) at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) at java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 14:13:42.766 [ForkJoinPool.commonPool-worker-7] ERROR druid.sql.Statement - [statementLogError,148] - {conn-10007, pstmt-20047} execute error. INSERT INTO ai_event_payload(send_time, ability, event_id, src_index, src_type, src_name, event_type, happen_time, stop_time, location_name, handle_status, event_level, remark, first_remind_time, last_remind_time, remind_count, two_remind_time,pic_uri, svr_index_code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?, ?,?,?) on duplicate key update send_time = VALUES (send_time), ability = VALUES (ability), src_index = VALUES (src_index), src_type = VALUES (src_type), src_name = VALUES (src_name), event_type = VALUES (event_type), happen_time = VALUES (happen_time), stop_time = VALUES (stop_time), location_name = VALUES (location_name), handle_status = VALUES (handle_status), event_level = VALUES (event_level), remark = VALUES (remark), first_remind_time = VALUES (first_remind_time), last_remind_time = VALUES (last_remind_time), remind_count = VALUES (remind_count), two_remind_time = VALUES (two_remind_time), pic_uri = VALUES (pic_uri), svr_index_code = VALUES (svr_index_code) com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:124) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3446) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:152) at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:483) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64) at com.sun.proxy.$Proxy255.update(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) at com.sun.proxy.$Proxy138.insert(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) at com.sun.proxy.$Proxy189.insertEventPayload(Unknown Source) at com.gcvcloud.interfaceservice.service.HaiKangService.processSingleEvent(HaiKangService.java:154) at com.gcvcloud.interfaceservice.service.HaiKangService.processWarnings(HaiKangService.java:62) at com.gcvcloud.interfaceservice.service.HaiKangService$$FastClassBySpringCGLIB$$f94d55fb.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at com.gcvcloud.interfaceservice.service.HaiKangService$$EnhancerBySpringCGLIB$$cf150d9b.processWarnings(<generated>) at com.gcvcloud.interfaceservice.controller.WarningNotificationController.lambda$handleEvent$0(WarningNotificationController.java:48) at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1626) at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) at java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 14:29:56.025 [ForkJoinPool.commonPool-worker-7] ERROR druid.sql.Statement - [statementLogError,148] - {conn-10007, pstmt-20029} execute error. INSERT INTO ai_event_payload(send_time, ability, event_id, src_index, src_type, src_name, event_type, happen_time, stop_time, location_name, handle_status, event_level, remark, first_remind_time, last_remind_time, remind_count, two_remind_time,pic_uri, svr_index_code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?, ?,?,?) on duplicate key update send_time = VALUES (send_time), ability = VALUES (ability), src_index = VALUES (src_index), src_type = VALUES (src_type), src_name = VALUES (src_name), event_type = VALUES (event_type), happen_time = VALUES (happen_time), stop_time = VALUES (stop_time), location_name = VALUES (location_name), handle_status = VALUES (handle_status), event_level = VALUES (event_level), remark = VALUES (remark), first_remind_time = VALUES (first_remind_time), last_remind_time = VALUES (last_remind_time), remind_count = VALUES (remind_count), two_remind_time = VALUES (two_remind_time), pic_uri = VALUES (pic_uri), svr_index_code = VALUES (svr_index_code) com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:124) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3446) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:434) at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3444) at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:152) at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:483) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64) at com.sun.proxy.$Proxy255.update(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) at com.sun.proxy.$Proxy138.insert(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) at com.sun.proxy.$Proxy189.insertEventPayload(Unknown Source) at com.gcvcloud.interfaceservice.service.HaiKangService.processSingleEvent(HaiKangService.java:154) at com.gcvcloud.interfaceservice.service.HaiKangService.processWarnings(HaiKangService.java:62) at com.gcvcloud.interfaceservice.service.HaiKangService$$FastClassBySpringCGLIB$$f94d55fb.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at com.gcvcloud.interfaceservice.service.HaiKangService$$EnhancerBySpringCGLIB$$d0369729.processWarnings(<generated>) at com.gcvcloud.interfaceservice.controller.WarningNotificationController.lambda$handleEvent$0(WarningNotificationController.java:48) at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1626) at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) at java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)什么错误
最新发布
10-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值