Spring cloud too many health check thread cause app down - spring

My Spring Cloud microservice is down and I dump the memory using:
/opt/dabai/tools/jdk1.8.0_211/bin/jmap -dump:format=b,file=/my.dump 1234
and found about 300 threads of threads,the stack trace is:
qtp1016625178-1983
at sun.misc.Unsafe.park(ZJ)V (Native Method)
at java.util.concurrent.locks.LockSupport.park(Ljava/lang/Object;)V (LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()Z (AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(I)V (AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(I)V (AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await()V (CountDownLatch.java:231)
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet()Ljava/lang/Object; (BlockingSingleSubscriber.java:81)
at reactor.core.publisher.Mono.block()Ljava/lang/Object; (Mono.java:1494)
at org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorRegistryBeans$ReactiveHealthIndicators.lambda$adapt$1(Lorg/springframework/boot/actuate/health/ReactiveHealthIndicator;)Lorg/springframework/boot/actuate/health/Health; (HealthIndicatorRegistryBeans.java:61)
at org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorRegistryBeans$ReactiveHealthIndicators$$Lambda$553.health()Lorg/springframework/boot/actuate/health/Health; (Unknown Source)
at org.springframework.boot.actuate.health.CompositeHealthIndicator.health()Lorg/springframework/boot/actuate/health/Health; (CompositeHealthIndicator.java:98)
at org.springframework.boot.actuate.health.HealthEndpoint.health()Lorg/springframework/boot/actuate/health/Health; (HealthEndpoint.java:50)
at org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(Lorg/springframework/boot/actuate/endpoint/SecurityContext;)Lorg/springframework/boot/actuate/endpoint/web/WebEndpointResponse; (HealthEndpointWebExtension.java:54)
at sun.reflect.GeneratedMethodAccessor334.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (ReflectionUtils.java:282)
at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(Lorg/springframework/boot/actuate/endpoint/InvocationContext;)Ljava/lang/Object; (ReflectiveOperationInvoker.java:76)
at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(Lorg/springframework/boot/actuate/endpoint/InvocationContext;)Ljava/lang/Object; (AbstractDiscoveredOperation.java:61)
at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$ServletWebOperationAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object; (AbstractWebMvcEndpointHandlerMapping.java:294)
at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object; (AbstractWebMvcEndpointHandlerMapping.java:355)
at sun.reflect.GeneratedMethodAccessor195.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke([Ljava/lang/Object;)Ljava/lang/Object; (InvocableHandlerMethod.java:189)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(Lorg/springframework/web/context/request/NativeWebRequest;Lorg/springframework/web/method/support/ModelAndViewContainer;[Ljava/lang/Object;)Ljava/lang/Object; (InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(Lorg/springframework/web/context/request/ServletWebRequest;Lorg/springframework/web/method/support/ModelAndViewContainer;[Ljava/lang/Object;)V (ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web/method/HandlerMethod;)Lorg/springframework/web/servlet/ModelAndView; (RequestMappingHandlerAdapter.java:892)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/springframework/web/method/HandlerMethod;)Lorg/springframework/web/servlet/ModelAndView; (RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Lorg/springframework/web/servlet/ModelAndView; (AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (DispatcherServlet.java:1038)
at org.springframework.web.servlet.DispatcherServlet.doService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (FrameworkServlet.java:897)
at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (HttpServlet.java:645)
at org.springframework.web.servlet.FrameworkServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (HttpServlet.java:750)
at org.eclipse.jetty.servlet.ServletHolder.handle(Lorg/eclipse/jetty/server/Request;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHolder.java:873)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1623)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (WebSocketUpgradeFilter.java:214)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (WebStatFilter.java:123)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (HttpTraceFilter.java:90)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.web.filter.CorsFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (CorsFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (FormContentFilter.java:92)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.cloud.sleuth.instrument.web.ExceptionLoggingFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (ExceptionLoggingFilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at brave.servlet.TracingFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (TracingFilter.java:86)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (WebMvcMetricsFilter.java:117)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (WebMvcMetricsFilter.java:106)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V (CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ServletHandler.java:1610)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ServletHandler.java:540)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (SessionHandler.java:1701)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ContextHandler.java:1345)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ServletHandler.java:480)
at org.eclipse.jetty.server.session.SessionHandler.doScope(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (SessionHandler.java:1668)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ContextHandler.java:1247)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(Ljava/lang/String;Lorg/eclipse/jetty/server/Request;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Lorg/eclipse/jetty/server/HttpChannel;)V (Server.java:502)
at org.eclipse.jetty.server.HttpChannel.handle()Z (HttpChannel.java:370)
at org.eclipse.jetty.server.HttpConnection.onFillable()V (HttpConnection.java:267)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded()V (AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable()Z (FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run()V (ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(Ljava/lang/Runnable;)V (EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(Z)Z (EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(Z)V (EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run()V (EatWhatYouKill.java:126)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run()V (ReservedThreadExecutor.java:366)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Ljava/lang/Runnable;)V (QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run()V (QueuedThreadPool.java:683)
at java.lang.Thread.run()V (Thread.java:748)
I am monitor the app using grafana,the app normal running about 90 threads.It grows up 200+ threads in half an hour.this is the monitor graphic(https://i.stack.imgur.com/DMDXZ.png):
Why would this happen?

Related

What causes a negative event timeout error to occur?

I am getting an error in my model (shown below) saying an event is being scheduled in the past. I have run into this error before in other models, but I don't know why or how it occurs. Root.arrival is not the name of anything in my model, so it seems to be something internal to the AnyLogic engine. Unfortunately the stack trace doesn't give me any info about where this happens in my model, so I don't know how to diagnose the origin. Does anyone know generally why/when/how a negative timeout may occur? Thanks in advance.
java.lang.RuntimeException: root.arrival: Trying to schedule an event in the past. Negative timeout: -0.07519763751588471
at com.anylogic.engine.Engine.error(Unknown Source)
at com.anylogic.engine.EventOriginator.d(Unknown Source)
at com.anylogic.engine.EventTimeout.restartTo(Unknown Source)
at com.anylogic.engine.jk$d.a(Unknown Source)
at com.anylogic.engine.jk.addMovingAgent(Unknown Source)
at com.anylogic.engine.g.d(Unknown Source)
at com.anylogic.engine.g.d(Unknown Source)
at com.anylogic.engine.g.d(Unknown Source)
at com.anylogic.engine.g.d(Unknown Source)
at com.anylogic.engine.be.d(Unknown Source)
at com.anylogic.engine.be.moveToInTime(Unknown Source)
at com.anylogic.engine.be.moveToInTime(Unknown Source)
at com.anylogic.engine.be.moveTo(Unknown Source)
at com.anylogic.engine.ExtAgentWithSpatialMetricsDelegate.moveTo(Unknown Source)
at com.anylogic.libraries.processmodeling.MoveTo.c(Unknown Source)
at com.anylogic.libraries.processmodeling.MoveTo.d(Unknown Source)
at com.anylogic.libraries.processmodeling.MoveTo.a(Unknown Source)
at com.anylogic.libraries.processmodeling.MoveTo.a(Unknown Source)
at com.anylogic.libraries.processmodeling.MoveTo$1.onEnter(Unknown Source)
at com.anylogic.libraries.processmodeling.Delay.b(Unknown Source)
at com.anylogic.libraries.processmodeling.Delay.b(Unknown Source)
at com.anylogic.libraries.processmodeling.Delay$9.onEnter(Unknown Source)
at com.anylogic.libraries.processmodeling.InputBlock$1.b(Unknown Source)
at com.anylogic.libraries.processmodeling.InPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.InPort.receiveImmediately(Unknown Source)
at com.anylogic.libraries.processmodeling.InputBlock$1.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
at com.anylogic.libraries.processmodeling.PlainTransfer$1.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
at com.anylogic.libraries.processmodeling.PlainTransfer$1.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock$2.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock$2.action(Unknown Source)
at com.anylogic.libraries.processmodeling.AsynchronousExecutor_xjal$a.execute(Unknown Source)
at com.anylogic.engine.LibraryEventHandler$l.execute(Unknown Source)
at com.anylogic.engine.Engine.d(Unknown Source)
at com.anylogic.engine.Engine.runFast(Unknown Source)
at com.anylogic.engine.Engine.runFast(Unknown Source)
Lots of things can cause it. In your case, it seems linked to a MoveTo block so you likely set the agent speed to a negative value.
Or maybe you defined it by "Trip time" and set that to a negative value:
In any case, it is worth learning to isolate such problems first. Use traceln commands to nudge yourself closer to the issue. Remove blocks, ...
Most of all: keep a history of your model dev so you can always revert to a version that does not trigger this. And then you have your root cause

Can you use "If" with two conditions (XSLT) Oracle Bi Publisher RTF Template

Inside a for-each, we have a choose the multiple when conditions.
What I need to do is this- In simple terms
WHEN a certain variable equals a value, If value 1 = somevalue and value 2 = someothervalue -> Do Something
Here is what I have. I have tried various forms and iterations and nothing seems to work either erroring when previewing or seemingly ignoring the code. I have done If then else, If and, as well as When and - I inherited this object and was not the original developer - ** at the two statements I am having trouble with. Any help is much appreciated. I can attach some source XML if needed. Thanks in advance.
<?xdoxslt:set_variable($_XDOCTX,'ACKIMPORT', '')?>
<?xdoxslt:set_variable($_XDOCTX,'ACKMATSURG', '')?>
<?xdoxslt:set_variable($_XDOCTX,'ACKTERMS', '')?>
<?xdoxslt:set_variable($_XDOCTX,'CARBCOMP', '')?>
<?xdoxslt:set_variable($_XDOCTX,'CPSC', '')?>
<?xdoxslt:set_variable($_XDOCTX,'DISCLAIMER', '')?>
<?xdoxslt:set_variable($_XDOCTX,'EXPORTREG', '')?>
<?xdoxslt:set_variable($_XDOCTX,'FLAME', '')?>
<?xdoxslt:set_variable($_XDOCTX,'INTRATE', '')?>
<?xdoxslt:set_variable($_XDOCTX,'REMITTO', '')?>
<?xdoxslt:set_variable($_XDOCTX,'SVCCHARGE', '')?>
<?xdoxslt:set_variable($_XDOCTX,'INV_1', '')?>
<?xdoxslt:set_variable($_XDOCTX,'INV_2', '')?>
<?xdoxslt:set_variable($_XDOCTX,'ACKTERMS_I', '')?>
<?xdoxslt:set_variable($_XDOCTX,'INVTERMS_I', '')?>
<?for-each:Print_Messages_S22?>
<?choose:?>
<?when:MessageID_ID5='ACKTERMS_I'?>
<?xdoxslt:set_variable($_XDOCTX, 'ACKTERMS_I', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='INVTERMS_I'?>
<?xdoxslt:set_variable($_XDOCTX, 'INVTERMS_I', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='INV_1_EN'?>
<?xdoxslt:set_variable($_XDOCTX, 'INV_1', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='INV_1_ENFR'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'INV_1', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='INV_2_EN'?>
<?xdoxslt:set_variable($_XDOCTX, 'INV_2', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='INV_2_ENFR'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'INV_2', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='ACKIMPORT'?>
<?xdoxslt:set_variable($_XDOCTX, 'ACKIMPORT', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='ACKIMPOR_F'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'ACKIMPORT', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='ACKMATSURG'?>
<?xdoxslt:set_variable($_XDOCTX, 'ACKMATSURG', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='ACKMATSU_F'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'ACKMATSURG', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='ACKTERMS'?>
<?xdoxslt:set_variable($_XDOCTX, 'ACKTERMS', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='ACKTERMS_F'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'ACKTERMS', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='CARBCOMP'?>
<?xdoxslt:set_variable($_XDOCTX, 'CARBCOMP', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='CPSC'?>
<?xdoxslt:set_variable($_XDOCTX, 'CPSC', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='DISCLAIMER'?>
<?xdoxslt:set_variable($_XDOCTX, 'DISCLAIMER', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='DISCLAIM_F'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'DISCLAIMER', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='EXPORTREG'?>
<?xdoxslt:set_variable($_XDOCTX, 'EXPORTREG', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='FLAME'?>
<?xdoxslt:set_variable($_XDOCTX, 'FLAME', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='INTRATE'?>
<?xdoxslt:set_variable($_XDOCTX, 'INTRATE', PrintMessage_ID3)?>
<?end when?>
<?when:MessageID_ID5='INTRATE_F'?>
<?if:../Sold_To_Country_ID47='CA'?><?xdoxslt:set_variable($_XDOCTX, 'INTRATE', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='SVCCHARGE'?>
<?xdoxslt:set_variable($_XDOCTX, 'SVCCHARGE', PrintMessage_ID3)?>
<?end when?>
**<?when:MessageID_ID5='REMITTO_CA'?>
<?xdofx:if ../Sold_To_Country_ID47='CA'
then <?if:../CurrencyCodeFrom_ID18='USD'?><?xdoxslt:set_variable($_XDOCTX, 'REMITTO', PrintMessage_ID3)?>)<?end if?>
else
end if?>
<?end when?>**
<?when:MessageID_ID5='REMITTO_IN'?>
<?if:../OrderType_ID46='S5' and UserReservedReference_ID6?><?xdoxslt:set_variable($_XDOCTX, 'REMITTO', PrintMessage_ID3)?><?end if?>
<?if:../OrderType_ID46='X5' and UserReservedReference_ID6?><?xdoxslt:set_variable($_XDOCTX, 'REMITTO', PrintMessage_ID3)?><?end if?>
<?end when?>
<?when:MessageID_ID5='REMITTO_US'?>
<?if:not(../OrderType_ID46='S7')?><?if:not(../OrderType_ID46='C7')?><?if:not(../OrderType_ID46='X7')?><?if:not(../UserReservedReference_ID6)?><?xdoxslt:set_variable($_XDOCTX, 'REMITTO', PrintMessage_ID3)?><?end if?><?end if?><?end if?><?end if?>
<?end when?>
**<?when:MessageID_ID5='REMITTO_CD'?>
<?xdofx:if ../Sold_To_Country_ID47='CA'
then <?if:../CurrencyCodeFrom_ID18='CAD'?><?xdoxslt:set_variable($_XDOCTX, 'REMITTO', PrintMessage_ID3)?>)<?end if?>
else
end if?>
<?end when?>**
<?end chose?>
<?end for-each?>

html2pdf do close of undefined on printing second time

I'm facing an issue related to PDF conversion. When convert any HTML web view initially it will create a PDF file successfully. But when i press back button and came back to convert page and press convert again it will give unknown error.
the stack trace is given below. Since the web pack kind of building app won't show line number where the error is. I couldn't identify the problem.
The web pack always show error in vendor.js whatever the error might be So, please tell me why the error is.
Frame: function:'doClose', file:'file:///data/data/org.nativescript.SuperMarket/files/app/vendor.js', line: 863, column: 22
System.err: Frame: function:'push.../node_modules/nativescript-html2pdf/html2pdf.js.exports.html2PdfFile', file:'file:///data/data/org.nativescript.SuperMarket/files/app/vendor.js', line: 834, column: 9
System.err: Frame: function:'webpackHotUpdate../views/htmlView/htmlView-page.js.exports.print', file:'file:///data/data/org.nativescript.SuperMarket/files/app/bundle.97e2cabb5862869d3b07.hot-update.js', line: 53, column: 25
System.err: Frame: function:'push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///data/data/org.nativescript.SuperMarket/files/app/vendor.js', line: 8847, column:
23
System.err: Frame: function:'push.../node_modules/tns-core-modules/data/observable/observable.js.Observable._emit', file:'file:///data/data/org.nativescript.SuperMarket/files/app/vendor.js', line: 8864, column: 18
System.err: Frame: function:'ClickListenerImpl.onClick', file:'file:///data/data/org.nativescript.SuperMarket/files/app/vendor.js', line: 18674, column: 23
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1083)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1070)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1050)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1042)
System.err: at com.tns.gen.java.lang.Object_vendor_18667_32_ClickListenerImpl.onClick(Object_vendor_18667_32_ClickListenerImpl.java:18)
System.err: at android.view.View.performClick(View.java:5215)
System.err: at android.view.View$PerformClick.run(View.java:21196)
System.err: at android.os.Handler.handleCallback(Handler.java:742)
System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
System.err: at android.os.Looper.loop(Looper.java:157)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5601)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)
System.err: Caused by: ExceptionConverter: java.io.IOException: The document has no pages.
System.err: Caused by: java.io.IOException: The document has no pages.
System.err: at com.itextpdf.text.pdf.PdfPages.writePageTree(PdfPages.java:112)
System.err: at com.itextpdf.text.pdf.PdfWriter.close(PdfWriter.java:1256)
System.err: at com.itextpdf.text.pdf.PdfDocument.close(PdfDocument.java:901)
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1083)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1070)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1050)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1042)
System.err: at com.tns.gen.java.lang.Object_vendor_18667_32_ClickListenerImpl.onClick(Object_vendor_18667_32_ClickListenerImpl.java:18)
System.err: at android.view.View.performClick(View.java:5215)
System.err: at android.view.View$PerformClick.run(View.java:21196)
System.err: at android.os.Handler.handleCallback(Handler.java:742)
System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
System.err: at android.os.Looper.loop(Looper.java:157)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5601)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)
As the error suggests java.io.IOException: The document has no pages. Looks like after back button press, cache/history is cleared and webview is empty.
You can store the context in appsettings.

Where is the Toolbar in Eclipse Luna?

I've just updated to Eclipse Luna, but the toolbar is missing. Window -> Show Toolbar/Hide Toolbar does nothing at all. In Window -> Customize Perspective, everything looks normal. This is the first time I opened Luna, and I've imported an old Kepler workspace. Any Ideas?
EDIT: The error only occurs, when I open eclipse from the desktop shortcut, not directly through the .exe...
From the error log (not sure if this is relevant, but it might be):
!ENTRY org.eclipse.ui 4 0 2015-01-07 13:31:02.028
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 12
at org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog.buttonPressed(OptionalMessageDialog.java:116)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:341)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.informUserAboutEmptyDefaultCategory(ContentAssistProcessor.java:602)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.getDefaultCategories(ContentAssistProcessor.java:504)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.getCategoryIteration(ContentAssistProcessor.java:492)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.setCategoryIteration(ContentAssistProcessor.java:487)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.access$3(ContentAssistProcessor.java:486)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor$CompletionListener.assistSessionStarted(ContentAssistProcessor.java:117)
at org.eclipse.jface.text.contentassist.ContentAssistant.fireSessionBeginEvent(ContentAssistant.java:2305)
at org.eclipse.jface.text.contentassist.ContentAssistant.prepareToShowCompletions(ContentAssistant.java:1718)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1683)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:183)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:122)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1529)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4722)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4610)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

Flex 4, Set variable in component skin from component

Given a custom component based on SkinnableContainer, how can I set values in the skin at runtime? Specifically, it is a whiteboard component with maxWidth and maxHeight values that indicate the smallest shared width/height of all the whiteboards in the conversation.
[Bindable]
public var maxWhiteBoardWidth:Number;
[Bindable]
public var maxWhiteBoardHeight:Number;
These values are used to draw guidelines on the surface of all the larger whiteboards in the conversation using stroke lines in the skin:
<!-- smallest common denominator boundaries -->
<s:Line left="300" top="0" bottom="0">
<s:stroke>
<s:SolidColorStroke weight="1" color="0xFFFFFF" />
</s:stroke>
</s:Line>
<s:Line top="300" left="0" right="0">
<s:stroke>
<s:SolidColorStroke weight="1" color="0xFFFFFF" />
</s:stroke>
</s:Line>
The value of 300 in the top and left attributes of s:Line should not be hard-coded into the skin. They should reflect the changing values of maxWhiteBoardWidth/maxWhiteBoardHeight from the component.
I am setting the skin using the skinClass attribute in MXML. Do I need to dynamically load the skin? If so when/how in the lifecycle?
I'm recently coming from Flex 3 so the Spark skinning architecture is still a bit murky. Thanks.
Try:
<s:Line left="{hostComponent.maxWhiteBoardWidth}" top="0" bottom="0">
...
</s:Line>
<s:Line top="{hostComponent.maxWhiteBoardHeight}" left="0" right="0">
...
</s:Line>
and make sure you have the metadata directive:
<fx:Metadata>
<!-- Specify the component that uses this skin class. -->
[HostComponent("my.component.MyComponent")]
</fx:Metadata>
otherwise your custom properties on the component will not be exposed to the skin properly.

Resources