Questions asked by nbthonghttps://answers.axonivy.com/questions/asked-by/1229/nbthong/?type=rssQuestions asked by <a href="/users/1229/nbthong" >nbthong</a>enMon, 01 Jun 2020 05:52:04 -0400Portal 8 - custom subMenu highlighthttps://answers.axonivy.com/questions/4579/portal-8-custom-submenu-highlight<p>In Portal 7 - I can highlight my custom SubMenu item with this code: <strong><em>administration.views.add("Administration.xhtml");</em></strong></p> <pre><code>SubMenuItem administration = new SubMenuItem(); administration.setMenuKind(MenuKind.CUSTOM); administration.setIcon("fa fa-database"); administration.setLabel("Administration")); administration.setLink(UrlUtils.getUrlByRequestID("17235FB212434858/administration.ivp")); administration.views.add("Administration.xhtml"); in.subMenuItems.add(administration); </code></pre> <p>But I see it not work in portal8. So the first question is how I can highlight my custom subMenu in portal8? </p> <p>Second point that How I can highlight my subMenu If my page start with IFrame? Because the view always <strong>ch.ivy.addon.portal.generic.iframe.TaskTemplateIFrame/TaskTemplateIFrame.xhtml</strong> </p>nbthongMon, 01 Jun 2020 05:52:04 -0400https://answers.axonivy.com/questions/4579/portal-8-custom-submenu-highlightportalivyIvy Engine 8 Deployment APIhttps://answers.axonivy.com/questions/4305/ivy-engine-8-deployment-api<p>I'm setup Ivy Engine 8 successful on remote server. And try to use the deployment API to deploy my iar file. But I got exception.</p> <pre><code>2019-12-27 14:18:37.671 ERROR [ch.ivyteam.ivy.webserver.rest.exception.IvyExceptionMapper] [http-nio-8088-exec-2] [application=0, requestId=4, session=5 (ivyadmin), executionContext=SYSTEM, client=192.168.78.69] null java.lang.NullPointerException at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source) at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source) at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source) at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.base/java.nio.file.Path.resolve(Unknown Source) at ch.ivyteam.ivy.deployment.restricted.DeploymentService$TemporaryDeployDirectory.getDeploymentFile(DeploymentService.java:126) at ch.ivyteam.ivy.deployment.restricted.DeploymentService$TemporaryDeployDirectory.writeFileToDeploy(DeploymentService.java:100) at ch.ivyteam.ivy.deployment.restricted.DeploymentService.deploy(DeploymentService.java:34) at ch.ivyteam.ivy.webserver.internal.rest.deploy.Deployment.deploy(Deployment.java:94) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler$PmvAwareInvocator.lambda$0(RestPmvInvocationHandler.java:41) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler$PmvAwareInvocator.call(RestPmvInvocationHandler.java:50) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler$PmvAwareInvocator.lambda$1(RestPmvInvocationHandler.java:42) at ch.ivyteam.ivy.security.exec.Sudo.call(Sudo.java:33) at ch.ivyteam.ivy.webserver.internal.rest.resource.project.RestPmvInvocationHandler$PmvAwareInvocator.invoke(RestPmvInvocationHandler.java:42) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80) at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:244) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680) at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:392) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:365) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:318) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ch.ivyteam.ivy.webserver.internal.filter.FilterChain.next(FilterChain.java:33) at ch.ivyteam.ivy.webserver.internal.filter.LicenceFilter.doFilter(LicenceFilter.java:13) at ch.ivyteam.ivy.webserver.internal.filter.AbstractFilter.doFilter(AbstractFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ch.ivyteam.ivy.webserver.internal.filter.FilterChain.next(FilterChain.java:33) at ch.ivyteam.ivy.webserver.internal.exception.ExceptionFilter.doFilter(ExceptionFilter.java:50) at ch.ivyteam.ivy.webserver.internal.filter.AbstractFilter.doFilter(AbstractFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ch.ivyteam.ivy.webserver.internal.filter.FilterChain.next(FilterChain.java:33) at ch.ivyteam.ivy.webserver.internal.startup.IvyEngineUnavailableFilter.doFilter(IvyEngineUnavailableFilter.java:32) at ch.ivyteam.ivy.webserver.internal.filter.AbstractFilter.doFilter(AbstractFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ch.ivyteam.ivy.webserver.internal.filter.FilterChain.next(FilterChain.java:33) at ch.ivyteam.util.callable.AbstractExecutionContext.lambda$0(AbstractExecutionContext.java:28) at ch.ivyteam.util.callable.AbstractExecutionContext.callInContext(AbstractExecutionContext.java:16) at ch.ivyteam.util.callable.AbstractExecutionContext.executeInContext(AbstractExecutionContext.java:26) at ch.ivyteam.ivy.webserver.internal.filter.RemoteClientFilter.doFilter(RemoteClientFilter.java:18) at ch.ivyteam.ivy.webserver.internal.filter.AbstractFilter.doFilter(AbstractFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ch.ivyteam.ivy.webserver.internal.filter.FilterChain.next(FilterChain.java:33) at ch.ivyteam.util.callable.AbstractExecutionContext.lambda$0(AbstractExecutionContext.java:28) at ch.ivyteam.util.callable.AbstractExecutionContext.callInContext(AbstractExecutionContext.java:16) at ch.ivyteam.util.callable.AbstractExecutionContext.executeInContext(AbstractExecutionContext.java:26) at ch.ivyteam.ivy.webserver.internal.filter.IvyCurrentHttpRequestFilter.doFilter(IvyCurrentHttpRequestFilter.java:13) at ch.ivyteam.ivy.webserver.internal.filter.AbstractFilter.doFilter(AbstractFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ch.ivyteam.ivy.webserver.internal.filter.FilterChain.next(FilterChain.java:33) at ch.ivyteam.util.callable.AbstractExecutionContext.lambda$0(AbstractExecutionContext.java:28) at ch.ivyteam.util.callable.AbstractExecutionContext.callInContext(AbstractExecutionContext.java:16) at ch.ivyteam.util.callable.AbstractExecutionContext.executeInContext(AbstractExecutionContext.java:26) at ch.ivyteam.ivy.security.exec.Sudo.execute(Sudo.java:63) at ch.ivyteam.ivy.webserver.internal.filter.IvyExecuteAsSystemFilter.doFilter(IvyExecuteAsSystemFilter.java:11) at ch.ivyteam.ivy.webserver.internal.filter.AbstractFilter.doFilter(AbstractFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at ch.ivyteam.ivy.webserver.internal.PerformanceLogValve.invoke(PerformanceLogValve.java:40) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Unknown Source) </code></pre> <p>My remote server is:</p> <pre><code>Window server 2012 </code></pre> <p>Java:</p> <pre><code>java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode) </code></pre> <p>Ivy Engine:</p> <pre><code>Axon.ivy Engine Version 8.0 Patch 0 Revision 1912040933 Copyright (c) 2001-2019 AXON Ivy AG ----------------------------------------------------- Java Version 11.0.5 (AdoptOpenJDK) JVM Version 11.0.5+10 (OpenJDK 64-Bit Server VM) </code></pre> <p>I use postman to call API. And Postman generated code for cURL.</p> <pre><code>curl --location --request POST 'http://10.123.0.174:8088/ivy/api/system/apps/ivy8app' \ --header 'X-Requested-By: curl' \ --header 'Authorization: Basic aXZ5YWRtaW46Ym9sdEA3ODk3ODk=' \ --header 'Content-Type: multipart/form-data; boundary=--------------------------880982583403848694607523' \ --form 'fileToDeploy=D:/EMTGRelease/QuickStartTutorial.iar' </code></pre> <p>I already create <strong>ivy8app</strong> by cockpit. Already bring the <strong>QuickStartTutorial.iar</strong> in my local forder D:/EMTGRelease/ to upload. I just think my value of "fileToDeploy" parameter is not correct 100%. Do you have any idea?</p> <blockquote> <p>Thanks &amp; Regards</p> </blockquote>nbthongFri, 27 Dec 2019 04:27:12 -0500https://answers.axonivy.com/questions/4305/ivy-engine-8-deployment-apiengineivydeployment