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.

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)

My remote server is:

Window server 2012

Java:

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)

Ivy Engine:

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)

I use postman to call API. And Postman generated code for cURL.

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'

I already create ivy8app by cockpit. Already bring the QuickStartTutorial.iar 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?

Thanks & Regards

asked 27.12.2019 at 04:27

nbthong's gravatar image

nbthong
1113
accept rate: 0%

edited 02.01 at 22:40

one easy work-around could be to leave the file POST request setup to maven. The project-build-plugin's deploy-to-engine goal can used via command-line. So all you need is a maven environment on the client that deploys. http://axonivy.github.io/project-build-plugin/release/8.0/deploy-to-engine-mojo.html

(03.01 at 02:51) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

Hi

From your curl command I suppose that you use Windows for the deployment. Because the file (or the better the path) you want to deploy starts with a D:, but after that the path has slashes ('/'). Windows normally uses backslashes ('\') for its filesystem. I don't know how curl handles this. But maybe this is your problem.

There is a document section about how to use curl for deployment: https://developer.axonivy.com/doc/latest/engine-guide/tool-reference/api-reference.html?highlight=curl#deployment

Kind regards

Lukas

link

answered 06.01 at 03:01

Lukas%20Lieb's gravatar image

Lukas Lieb ♦♦
4161211
accept rate: 60%

edited 06.01 at 05:55

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×140
×38
×25

Asked: 27.12.2019 at 04:27

Seen: 233 times

Last updated: 06.01 at 05:55