Hello,

I discovered a conflict with the management of service engine parameters and how I want to use them :)

I created a new engine to call rest service for a specific case with different parameters on the engine definition for a customer site. I have different OFBiz environments where my parameters value change :

        <engine name="rest-api-serveur-one" class="com.customersite.service.engine.RestClientApiEngine">
            <parameter name="authUrl" value="MyOaut2Server"/>...
            <parameter name="apiKey" value="04bdeada5093"/>
        </engine>

But on one environment, I need to put one parameter value to empty. The problem in the code base org.apache.ofbiz.service.config.model.Parameter.java:41 :

        if (value.isEmpty()) {
            throw new ServiceConfigException("<parameter> element value attribute is empty");
        }

So when ofbiz start, this instance failed because an empty parameters is considers as fatal for the server. I suggest to just inform that the parameter is empty instead of stop the server loading :

        if (value.isEmpty()) {
            Debug.logWarning("<parameter name=\"" + name + "\"> element value attribute is empty", module);
        }

Do you have an opinion ?

Nicolas
--
logoNrd <https://nereide.fr/>
        Nicolas Malin
The apache way <http://theapacheway.com/> : *Charity* Apache’s mission is providing software for the public good.
[email protected]
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <http://theapacheway.com/>|réseau LE <http://www.libre-entreprise.org/>

Reply via email to