Petals BC Filetransfer

Avoid to re-deploy service-unit if the polled directory does not exist

Details

  • Type: Improvement Request Improvement Request
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.3.1
  • Fix Version/s: 3.3.2
  • Security Level: Public
  • Description:
    Hide

    When deploying a service unit (service consumer), an error occurs if the polled directory does not exist and its start-up fails:

    sample-0 2016/05/26 16:23:21,428 GMT+0100 SEVERE [Petals.Extensions.AutoLoaderService.InstallDirectoryScannerImpl] : Error during the deployment of a service assembly: 
    javax.jbi.management.DeploymentException: Failed to start SU
            at org.ow2.petals.component.framework.su.AbstractServiceUnitManager.start(AbstractServiceUnitManager.java:669)
            at org.ow2.petals.microkernel.container.lifecycle.ServiceUnitLifeCycleImpl$3.call(ServiceUnitLifeCycleImpl.java:125)
            at org.ow2.petals.microkernel.container.lifecycle.ServiceUnitLifeCycleImpl$3.call(ServiceUnitLifeCycleImpl.java:121)
            at org.ow2.petals.microkernel.container.lifecycle.util.SeparateIsolatingThread$2.call(SeparateIsolatingThread.java:144)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)
        Caused by: org.ow2.petals.component.framework.api.exception.PEtALSCDKException: javax.jbi.messaging.MessagingException: 'folder' parameter with value '/tmp/folder-in' evaluated to '/tmp/folder-in' does not exist
            at org.ow2.petals.bc.filetransfer.listeners.FileTransferExternalListener.start(FileTransferExternalListener.java:46)
            at org.ow2.petals.component.framework.bc.ExternalListenerManager.startListening(ExternalListenerManager.java:68)
            at org.ow2.petals.component.framework.bc.BindingComponentServiceUnitManager.startInternal(BindingComponentServiceUnitManager.java:62)
            at org.ow2.petals.component.framework.su.AbstractServiceUnitManager.start(AbstractServiceUnitManager.java:638)
            ... 7 more
        Caused by: javax.jbi.messaging.MessagingException: 'folder' parameter with value '/tmp/folder-in' evaluated to '/tmp/folder-in' does not exist
            at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.buildConsumeConfiguration(FileTransferUtils.java:162)
            at org.ow2.petals.bc.filetransfer.listeners.FileTransferExternalListener.start(FileTransferExternalListener.java:42)
            ... 10 more
        Caused by: java.io.FileNotFoundException: 'folder' parameter with value '/tmp/folder-in' evaluated to '/tmp/folder-in' does not exist
            at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.getFolderPath(FileTransferUtils.java:419)
            at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.buildConsumeConfiguration(FileTransferUtils.java:159)
            ... 11 more

    To fix this, it is required to redeploy (undeploy + deploy) the service unit after to have created the polled directory.

    This should be improved:

    • if the polled directory does not exist, the start-up succeeds but no directory is listen,
    • so, a service unit restart is sufficient after to have created the polled directory to restore the file listening and service invocations.
    Show
    When deploying a service unit (service consumer), an error occurs if the polled directory does not exist and its start-up fails:
    sample-0 2016/05/26 16:23:21,428 GMT+0100 SEVERE [Petals.Extensions.AutoLoaderService.InstallDirectoryScannerImpl] : Error during the deployment of a service assembly: 
    javax.jbi.management.DeploymentException: Failed to start SU
            at org.ow2.petals.component.framework.su.AbstractServiceUnitManager.start(AbstractServiceUnitManager.java:669)
            at org.ow2.petals.microkernel.container.lifecycle.ServiceUnitLifeCycleImpl$3.call(ServiceUnitLifeCycleImpl.java:125)
            at org.ow2.petals.microkernel.container.lifecycle.ServiceUnitLifeCycleImpl$3.call(ServiceUnitLifeCycleImpl.java:121)
            at org.ow2.petals.microkernel.container.lifecycle.util.SeparateIsolatingThread$2.call(SeparateIsolatingThread.java:144)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)
        Caused by: org.ow2.petals.component.framework.api.exception.PEtALSCDKException: javax.jbi.messaging.MessagingException: 'folder' parameter with value '/tmp/folder-in' evaluated to '/tmp/folder-in' does not exist
            at org.ow2.petals.bc.filetransfer.listeners.FileTransferExternalListener.start(FileTransferExternalListener.java:46)
            at org.ow2.petals.component.framework.bc.ExternalListenerManager.startListening(ExternalListenerManager.java:68)
            at org.ow2.petals.component.framework.bc.BindingComponentServiceUnitManager.startInternal(BindingComponentServiceUnitManager.java:62)
            at org.ow2.petals.component.framework.su.AbstractServiceUnitManager.start(AbstractServiceUnitManager.java:638)
            ... 7 more
        Caused by: javax.jbi.messaging.MessagingException: 'folder' parameter with value '/tmp/folder-in' evaluated to '/tmp/folder-in' does not exist
            at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.buildConsumeConfiguration(FileTransferUtils.java:162)
            at org.ow2.petals.bc.filetransfer.listeners.FileTransferExternalListener.start(FileTransferExternalListener.java:42)
            ... 10 more
        Caused by: java.io.FileNotFoundException: 'folder' parameter with value '/tmp/folder-in' evaluated to '/tmp/folder-in' does not exist
            at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.getFolderPath(FileTransferUtils.java:419)
            at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.buildConsumeConfiguration(FileTransferUtils.java:159)
            ... 11 more
    To fix this, it is required to redeploy (undeploy + deploy) the service unit after to have created the polled directory. This should be improved:
    • if the polled directory does not exist, the start-up succeeds but no directory is listen,
    • so, a service unit restart is sufficient after to have created the polled directory to restore the file listening and service invocations.
  • Environment:
    -

Activity

People

Dates

  • Created:
    Thu, 2 Jun 2016 - 14:46:52 +0200
    Updated:
    Thu, 2 Jun 2016 - 15:19:38 +0200
    Resolved:
    Thu, 2 Jun 2016 - 15:19:38 +0200