Questions Tagged With ivy6x-migrationhttps://answers.axonivy.com/tags/ivy6x-migration/?type=rssquestions 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-migrationwebsocketProject-build-plugin 6.1 SNAPSHOT failed to build ivy project 6.1 due to source level: Java 1.8https://answers.axonivy.com/questions/1660/project-build-plugin-6-1-snapshot-failed-to-build-ivy-project-6-1-due-to-source-level-java-1-8<p>Hi Ivy team, I used <strong>project-build-plugin 6.1 SNAPSHOT</strong><br> However I was failed to build project due to source level: Java 1.8. </p> <pre><code>PS C:\Users\trungnguyen\Desktop\HuyANh\standard&gt; mvn clean verify -e [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... Downloading: <a href="https://oss.sonatype.org/content/repositories/snapshots/com/axonivy/ivy/ci/project-build-plugin/6.1.0-SNAPS">https://oss.sonatype.org/content/repositories/snapshots/com/axonivy/ivy/ci/project-build-plugin/6.1.0-SNAPS</a> HOT/maven-metadata.xml Downloaded: <a href="https://oss.sonatype.org/content/repositories/snapshots/com/axonivy/ivy/ci/project-build-plugin/6.1.0-SNAPSH">https://oss.sonatype.org/content/repositories/snapshots/com/axonivy/ivy/ci/project-build-plugin/6.1.0-SNAPSH</a> OT/maven-metadata.xml (2 KB at 0.6 KB/sec) [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building standard 100.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ standard --- [INFO] Deleting C:\Users\trungnguyen\Desktop\HuyANh\standard\target [INFO] Deleting C:\Users\trungnguyen\Desktop\HuyANh\standard\classes [INFO] [INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ standard --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-conventions) @ standard --- [INFO] [INFO] --- project-build-plugin:6.1.0-SNAPSHOT:installEngine (default-installEngine) @ standard --- [INFO] Compiling project for ivy version 6.1.0 [INFO] [INFO] --- project-build-plugin:6.1.0-SNAPSHOT:compileProject (default-compileProject) @ standard --- [INFO] Compiling ivy Project... [INFO] Cleaning sources in [src_dataClasses] [INFO] Generating java sources for 3 ivy DataClasses to [src_dataClasses] [INFO] Cleaning output folders [classes] [INFO] Compiling sources in [src, src_hd, src_rd, src_ws, src_wsproc, src_dataClasses] to output directory 'classes' [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.575 s [INFO] Finished at: 2016-02-16T17:27:29+07:00 [INFO] Final Memory: 60M/613M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.axonivy.ivy.ci:project-build-plugin:6.1.0-SNAPSHOT:compileProject (default-compileProject) on project standard: Failed to compile project 'C:\Users\trungnguyen\Desktop\HuyANh\standard'. InvocationTargetException: Java compiler error : source level should be comprised in between '1.3' and '1.7' (or '5', '5.0', ..., '7' or '7 .0'): 1.8 -&gt; [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.axonivy.ivy.ci:project-build-plugin:6 .1.0-SNAPSHOT:compileProject (default-compileProject) on project standard: Failed to compile project 'C:\Users\trungnguyen\Desktop\HuyANh\standard'. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder. java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) 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:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to compile project 'C:\Users\trungnguyen/Desktop\HuyANh\standard'. at ch.ivyteam.ivy.maven.AbstractProjectCompileMojo.execute(AbstractProjectCompileMojo.java:73) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.reflect.InvocationTargetException 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:497) at ch.ivyteam.ivy.maven.engine.MavenProjectBuilderProxy.lambda$compile$2(MavenProjectBuilderProxy.java:82) at ch.ivyteam.ivy.maven.engine.MavenProjectBuilderProxy.executeInEngineDir(MavenProjectBuilderProxy.java:115) at ch.ivyteam.ivy.maven.engine.MavenProjectBuilderProxy.compile(MavenProjectBuilderProxy.java:81) at ch.ivyteam.ivy.maven.CompileProjectMojo.compile(CompileProjectMojo.java:60) at ch.ivyteam.ivy.maven.AbstractProjectCompileMojo.execute(AbstractProjectCompileMojo.java:69) ... 22 more Caused by: java.lang.RuntimeException: Java compiler error : source level should be comprised in between '1.3' and '1.7' (or '5', '5.0', ..., '7' or '7.0'): 1.8 at ch.ivyteam.ivy.java.internal.JavaBuilder.compileWithJdt(JavaBuilder.java:144) at ch.ivyteam.ivy.java.internal.JavaBuilder.build(JavaBuilder.java:114) at ch.ivyteam.ivy.project.build.MavenProjectBuilder$1.call(MavenProjectBuilder.java:147) at ch.ivyteam.ivy.project.build.MavenProjectBuilder$1.call(MavenProjectBuilder.java:1) at ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1467) at ch.ivyteam.ivy.scripting.dataclass.internal.InMemoryEngineController.executeAsSystem(InMemoryEngineController .java:100) at ch.ivyteam.ivy.project.build.MavenProjectBuilder.buildOnServer(MavenProjectBuilder.java:121) at ch.ivyteam.ivy.project.build.MavenProjectBuilder.compile(MavenProjectBuilder.java:99) ... 31 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] <a href="http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException">http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException</a> </code></pre> <p>The problem happened even when I run build for new empty project.</p>Trung NguyenTue, 16 Feb 2016 12:36:05 -0500https://answers.axonivy.com/questions/1660/project-build-plugin-6-1-snapshot-failed-to-build-ivy-project-6-1-due-to-source-level-java-1-8ivy6x-migrationgetProcessElement() not found when migrating to Ivy 6https://answers.axonivy.com/questions/1592/getprocesselement-not-found-when-migrating-to-ivy-6<p>Hello,</p> <p>While testing migration of various projects to Ivy 6.0, I encountered a problem with a method that does not exist anymore.</p> <pre><code> /** * Find the current process name. * * @return fully qualified process name * @throws Exception */ public static String getName() throws Exception { return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable&lt;String&gt;() { public String call() { IProcess process = ProcessNavigationUtil.getProcess(MetaData.getProcessElement()); if (process != null) return process.getPath(); return null; } }); } </code></pre> <p>In the previous code, the method <strong>MetaData.getProcessElement()</strong> is not found. By looking in Ivy 5.1.7, it was implemented as:</p> <pre><code> public static ZObject getProcessElement() { return (ZObject)IvyThreadContext.getIvyThreadLocalValue("processElement"); } </code></pre> <p>Now the method has been removed, and a new method <strong>getProcessElementId()</strong> was added, but with a new signature:</p> <pre><code> public static PID getProcessElementId() { return (PID)IvyThreadContext.getIvyThreadLocalValue("processElement"); } </code></pre> <p>I didn't found this change in the migration documentation. Can I know the reason for removing the previous method and what are the alternative in order to get the current process name? Thanks.</p>A1234Mon, 14 Dec 2015 15:03:18 -0500https://answers.axonivy.com/questions/1592/getprocesselement-not-found-when-migrating-to-ivy-6ivy6x-migration