Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-2889

WorkItemHandler archetype can't be uploaded into business-central

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.8.1.GA
    • 7.7.0.GA
    • Business Central
    • RHPAM 7.7.0.GA + JBoss EAP 7.2.4

    • CR1
    • ?
    • Hide

      $ mkdir test-workitem

      $ cd test-workitem

      $ mvn archetype:generate \
      -DarchetypeGroupId=org.jbpm \
      -DarchetypeArtifactId=jbpm-workitems-archetype \
      -DarchetypeVersion=7.33.0.Final-redhat-00002 \
      -Dversion=1.0.0-SNAPSHOT \
      -DgroupId=com.redhat \
      -DartifactId=FailedDeployment \
      -DclassPrefix=FailedDeploymentWorkItem

      $ cd FailedDeployment

      $ mvn clean package -Dmaven.test.skip=true

      There will be following file in target/ folder "FailedDeployment-7.33.0.Final-redhat-00002.jar".

      Now open business-central -> Settings -> Artifacts and try to upload this file.

      Show
      $ mkdir test-workitem $ cd test-workitem $ mvn archetype:generate \ -DarchetypeGroupId=org.jbpm \ -DarchetypeArtifactId=jbpm-workitems-archetype \ -DarchetypeVersion=7.33.0.Final-redhat-00002 \ -Dversion=1.0.0-SNAPSHOT \ -DgroupId=com.redhat \ -DartifactId=FailedDeployment \ -DclassPrefix=FailedDeploymentWorkItem $ cd FailedDeployment $ mvn clean package -Dmaven.test.skip=true There will be following file in target/ folder "FailedDeployment-7.33.0.Final-redhat-00002.jar". Now open business-central -> Settings -> Artifacts and try to upload this file.
    • 2020 Week 19-21 (from May 4), 2020 Week 22-24 (from May 25), 2020 Week 25-27 (from Jun 15), 2020 Week 28-30 (from Jul 6), 2020 Week 31-33 (from Jul 27)

      Following this doc [1] and trying to upload work item handler into business-central, it fails with:

      ~~~
      09:09:08,579 INFO [org.guvnor.m2repo.backend.server.M2Servlet] (default task-6) POST request received.
      09:09:11,567 ERROR [io.undertow.request] (default task-6) UT005023: Exception handling request to /business-central/maven2: java.lang.RuntimeException: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact org.jbpm.contrib:FailedDeployment:jar:7.33.0.Final-redhat-00002 from/to jboss-releases-repository (https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/): Unauthorized (401)
      at org.guvnor.m2repo.backend.server.repositories.DistributionManagementArtifactRepository.deploy(DistributionManagementArtifactRepository.java:145)
      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:498)
      at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
      at org.guvnor.m2repo.backend.server.repositories.ArtifactRepository$870664176$Proxy$_$$_WeldClientProxy.deploy(Unknown Source)
      at org.guvnor.m2repo.backend.server.GuvnorM2Repository.lambda$deployArtifact$4(GuvnorM2Repository.java:307)
      at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
      at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
      at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
      at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
      at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
      at org.guvnor.m2repo.backend.server.GuvnorM2Repository.deployArtifact(GuvnorM2Repository.java:307)
      at org.guvnor.m2repo.backend.server.GuvnorM2Repository.deployArtifact(GuvnorM2Repository.java:181)
      at org.guvnor.m2repo.backend.server.GuvnorM2Repository.deployArtifact(GuvnorM2Repository.java:146)
      at org.guvnor.m2repo.backend.server.GuvnorM2Repository$Proxy$_$$_WeldClientProxy.deployArtifact(Unknown Source)
      at org.guvnor.m2repo.backend.server.M2RepoServiceImpl.deployJar(M2RepoServiceImpl.java:80)
      at org.guvnor.m2repo.backend.server.M2RepoServiceImpl$Proxy$_$$_WeldClientProxy.deployJar(Unknown Source)
      at org.guvnor.m2repo.backend.server.helpers.HttpPostHelper.deploy(HttpPostHelper.java:183)
      at org.guvnor.m2repo.backend.server.helpers.HttpPostHelper.uploadJar(HttpPostHelper.java:167)
      at org.guvnor.m2repo.backend.server.helpers.HttpPostHelper.upload(HttpPostHelper.java:123)
      at org.guvnor.m2repo.backend.server.helpers.HttpPostHelper.handle(HttpPostHelper.java:64)
      at org.guvnor.m2repo.backend.server.M2Servlet.doPost(M2Servlet.java:57)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:706)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:173)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at org.uberfire.ext.security.server.BasicAuthSecurityFilter.doFilter(BasicAuthSecurityFilter.java:105)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:110)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:70)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact org.jbpm.contrib:FailedDeployment:jar:7.33.0.Final-redhat-00002 from/to jboss-releases-repository (https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/): Unauthorized (401)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:318)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:420)
      at org.guvnor.m2repo.backend.server.repositories.DistributionManagementArtifactRepository.deploy(DistributionManagementArtifactRepository.java:140)
      ... 91 more
      Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.jbpm.contrib:FailedDeployment:jar:7.33.0.Final-redhat-00002 from/to jboss-releases-repository (https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/): Unauthorized (401)
      at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:274)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)
      ... 94 more
      Caused by: org.apache.http.client.HttpResponseException: Unauthorized (401)
      at org.eclipse.aether.transport.http.HttpTransporter.handleStatus(HttpTransporter.java:519)
      at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:322)
      at org.eclipse.aether.transport.http.HttpTransporter.implPut(HttpTransporter.java:296)
      at org.eclipse.aether.spi.connector.transport.AbstractTransporter.put(AbstractTransporter.java:117)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
      ... 96 more
      ~~~

      It seems somewhere in the pom hierarchy of this handler there is a distributionManagement section defined with that repository. I have not defined that repository myself, it must be issue with archetype.

      [1] https://access.redhat.com/documentation/en-us/red_hat_process_automation_manager/7.5/html-single/custom_tasks_and_work_item_handlers_in_business_central/index#custom-tasks-creating-work-item-handler-projects-proc-custom-tasks

        1. effective-pom.xml
          295 kB
          Alberto Fanjul Alonso
        2. FireShot Capture 098 - Business Central - localhost.png
          539 kB
          Xiaofeng Bai
        3. ST-install.mp4
          3.86 MB
          Xiaofeng Bai

              xiabai@redhat.com Xiaofeng Bai
              rhn-support-omolinab Oscar Molina
              Jan Stastny Jan Stastny
              Jan Stastny Jan Stastny
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: