Questions Tagged With ivy6x-migrationhttps://answers.axonivy.com/tags/ivy6x-migration/?type=rss&user=Lars%20Tuchelquestions tagged <span class="tag">ivy6x-migration</span>enThu, 31 Aug 2017 08:55:55 -0400Can I use a WebSocket in Axon.ivy 6.x?https://answers.axonivy.com/questions/2838/can-i-use-a-websocket-in-axon-ivy-6-x<p>Hi ivyTeam</p> <p>I need to have a WebSocket in an ivyProject. I thought about using Primefaces Push Endpoints for this. I know about <a href="https://answers.axonivy.com/questions/10/can-i-use-primepush-in-xpert-ivy">this solution for ivy 4.x and 5.x</a> but this doesn't seem to work anymore. I get the following errors and no endpoints are available:</p> <pre><code>13:56:58.687 WARN [org.atmosphere.cpr.AsynchronousProcessor] [http-nio-8081-exec-3] [requestId=3] Websocket protocol not supported 13:57:09.974 WARN [org.apache.catalina.loader.WebappClassLoaderBase] [localhost-startStop-2] [] The web application [ivy] appears to have started a thread named [Atmosphere-Scheduler-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1134) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) 13:57:09.975 WARN [org.apache.catalina.loader.WebappClassLoaderBase] [localhost-startStop-2] [] The web application [ivy] appears to have started a thread named [Atmosphere-Scheduler-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1129) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) 13:57:46.830 WARN [] [main] [executionContext=SYSTEM] the logger can't be the child of org.eclipse.birt 13:59:28.618 WARN [org.atmosphere.cpr.DefaultAsyncSupportResolver] [http-nio-8081-exec-2] [requestId=1] Found multiple containers, please specify which one to use: org.atmosphere.container.Tomcat7CometSupport, org.atmosphere.container.TomcatCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.Tomcat7CometSupport 13:59:28.638 ERROR [org.primefaces.push.PushServlet] [http-nio-8081-exec-2] [requestId=1] No Annotated class using @PushEndpoint found. Push will not work. 13:59:28.664 WARN [org.atmosphere.cpr.AsynchronousProcessor] [http-nio-8081-exec-2] [requestId=1] Websocket protocol not supported 14:02:04.718 WARN [org.apache.catalina.loader.WebappClassLoaderBase] [localhost-startStop-2] [] The web application [ivy] appears to have started a thread named [Atmosphere-Scheduler-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1134) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) 14:02:04.720 WARN [org.apache.catalina.loader.WebappClassLoaderBase] [localhost-startStop-2] [] The web application [ivy] appears to have started a thread named [Atmosphere-Scheduler-6] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1129) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) 14:03:26.818 WARN [] [main] [executionContext=SYSTEM] the logger can't be the child of org.eclipse.birt 14:04:38.170 WARN [org.atmosphere.cpr.DefaultAsyncSupportResolver] [http-nio-8081-exec-2] [requestId=2] Found multiple containers, please specify which one to use: org.atmosphere.container.Tomcat7CometSupport, org.atmosphere.container.TomcatCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.Tomcat7CometSupport 14:04:38.189 ERROR [org.primefaces.push.PushServlet] [http-nio-8081-exec-2] [requestId=2] No Annotated class using @PushEndpoint found. Push will not work. 14:04:38.209 WARN [org.atmosphere.cpr.AsynchronousProcessor] [http-nio-8081-exec-2] [requestId=2] Websocket protocol not supported 14:09:54.778 WARN [org.apache.catalina.loader.WebappClassLoaderBase] [localhost-startStop-2] [] The web application [ivy] appears to have started a thread named [Atmosphere-Scheduler-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1134) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) 14:09:54.779 WARN [org.apache.catalina.loader.WebappClassLoaderBase] [localhost-startStop-2] [] The web application [ivy] appears to have started a thread named [Atmosphere-Scheduler-11] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1129) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) 14:10:30.830 WARN [] [Worker-0] [executionContext=SYSTEM] the logger can't be the child of org.eclipse.birt </code></pre> <p>Here's what I added to the web.xml:</p> <pre><code> &lt;servlet&gt; &lt;servlet-name&gt;Push Servlet&lt;/servlet-name&gt; &lt;servlet-class&gt;org.primefaces.push.PushServlet&lt;/servlet-class&gt; &lt;async-supported&gt;true&lt;/async-supported&gt; &lt;init-param&gt; &lt;param-name&gt;org.atmosphere.useWebSocketAndServlet3&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/init-param&gt; &lt;init-param&gt; &lt;param-name&gt;org.atmosphere.websocket.suppressJSR356&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/init-param&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Push Servlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/primepush/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; </code></pre> <p>And what I added to the webapps/ivy/WEB-INF/lib directory:</p> <pre><code>atmosphere-runtime-native-2.4.14.jar atmosphere-compat-tomcat-2.0.1.jar atmosphere-compat-jbossweb-2.0.1.jar atmosphere-compat-tomcat7-2.0.1.jar </code></pre> <p>I saw that you implemented a websocket for the chat feature in the Portal (XIVY-519) so it should still work. But in the Portal project, the atmosphere jar is directly in the project so the old way in the question linked above probably doesn't work anymore... </p> <p>TLDR; Could you give me a hint how I can create my own WebSocket endpoints in ivy 6.x?</p>Lars TuchelThu, 31 Aug 2017 08:55:55 -0400https://answers.axonivy.com/questions/2838/can-i-use-a-websocket-in-axon-ivy-6-xprimepushivy6x-migrationwebsocket