Petals Distribution

Handle relative path for component properties files during deploy

Details

  • Type: Bug Bug
  • Status: New New
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 5.1.0
  • Fix Version/s: 6.0.0
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    While deploying with a property files from cli, giving a property file with a relative path will always fail. The container will not be able to resolve the path:

    # Petals cli :
    deploy -u mvn:org.ow2.petals/petals-bc-rest/1.2.0/zip -D propertiesFile=./conf/rest.properties
    ERROR on line 3: org.ow2.petals.admin.api.exception.ArtifactAdministrationException: org.ow2.petals.jmx.api.api.exception.InstallerComponentErrorException: org.ow2.petals.jmx.api.impl.exception.PerformActionErrorException: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
    	java.lang.ClassNotFoundException: com.ebmwebsourcing.easycommons.properties.PropertiesException (no security manager: RMI class loader disabled)
    
    # Petals ESB:
    sample-0 2018/06/01 15:39:32,864 GMT+0200 SEVERE [Petals.Container.Lifecycle.Installer] : Can't install component
    javax.jbi.JBIException: com.ebmwebsourcing.easycommons.properties.PropertiesException: PETALS_HOME is not defined
    

    In that case, container should rely on 'server.properties' to try to resolve the path.

    Show
    While deploying with a property files from cli, giving a property file with a relative path will always fail. The container will not be able to resolve the path:
    # Petals cli :
    deploy -u mvn:org.ow2.petals/petals-bc-rest/1.2.0/zip -D propertiesFile=./conf/rest.properties
    ERROR on line 3: org.ow2.petals.admin.api.exception.ArtifactAdministrationException: org.ow2.petals.jmx.api.api.exception.InstallerComponentErrorException: org.ow2.petals.jmx.api.impl.exception.PerformActionErrorException: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
    	java.lang.ClassNotFoundException: com.ebmwebsourcing.easycommons.properties.PropertiesException (no security manager: RMI class loader disabled)
    
    # Petals ESB:
    sample-0 2018/06/01 15:39:32,864 GMT+0200 SEVERE [Petals.Container.Lifecycle.Installer] : Can't install component
    javax.jbi.JBIException: com.ebmwebsourcing.easycommons.properties.PropertiesException: PETALS_HOME is not defined
    
    In that case, container should rely on 'server.properties' to try to resolve the path.
  • Environment:
    Unix

Activity

Hide
Christophe DENEUX added a comment - Fri, 1 Jun 2018 - 16:32:48 +0200

PETAL_HOME was removed in a previous version of Petals ESB. Now, Petals container must resolved relative path against the directory of 'server.properties'.

Show
Christophe DENEUX added a comment - Fri, 1 Jun 2018 - 16:32:48 +0200 PETAL_HOME was removed in a previous version of Petals ESB. Now, Petals container must resolved relative path against the directory of 'server.properties'.
Hide
Christophe DENEUX added a comment - Mon, 4 Jun 2018 - 12:04:56 +0200 - edited

The relative path is resolved at CDK level. The problem is that CDK does not know where the file `server.properties` is stored. So to be able to resolve the relative path:

  • we could kept the env var PETALS_HOME, but for all containers running on a same machine, properties file could be mixed,
  • I think it should be better to extends the JBI API to be able to retrieve few JBI container configuration properties. The JBI API to extends will be javax.jbi.component.ComponentContext introducing the following method:
    Properties getContainerConfigurationProperties()

As the JBI API will be changed, this issue is planned for the next major release.

Show
Christophe DENEUX added a comment - Mon, 4 Jun 2018 - 12:04:56 +0200 - edited The relative path is resolved at CDK level. The problem is that CDK does not know where the file `server.properties` is stored. So to be able to resolve the relative path:
  • we could kept the env var PETALS_HOME, but for all containers running on a same machine, properties file could be mixed,
  • I think it should be better to extends the JBI API to be able to retrieve few JBI container configuration properties. The JBI API to extends will be javax.jbi.component.ComponentContext introducing the following method:
    Properties getContainerConfigurationProperties()
As the JBI API will be changed, this issue is planned for the next major release.

People

Dates

  • Created:
    Fri, 1 Jun 2018 - 16:21:03 +0200
    Updated:
    Fri, 13 Dec 2019 - 15:52:06 +0100