thr.printStackTrace();
sfLog().error(thr);
    protected ProcessCompound addNewProcessCompound(Object name, ComponentDescription cd)        throws Exception {        // Check if process creation is allowed        boolean allowProcess=false;        Object ap = sfResolveHere(SmartFrogCoreKeys.SF_PROCESS_ALLOW,false);        if (ap == null) {            allowProcess = false;        } else if (ap instanceof Boolean) {            allowProcess = ((Boolean) ap).booleanValue() && sfIsRoot;        } else {            allowProcess = false;            if (sfLog().isErrorEnabled()) {                SmartFrogResolutionException srex =                        SmartFrogResolutionException.illegalClassType(                                Reference.fromString(SmartFrogCoreKeys.SF_PROCESS_ALLOW),                                sfCompleteNameSafe(),                                ap,                                ap.getClass().getName(),                                "java.lang.Boolean");                sfLog().error(srex);            }        }        if (!allowProcess) {            throw SmartFrogResolutionException.generic(sfCompleteName(),                "Not allowed to create process '"+ name.toString()+"'");        }        // Locate timeout        Object timeoutObj = null;        long timeout = 0L;        try {            timeoutObj = sfResolveHere(SmartFrogCoreKeys.SF_PROCESS_TIMEOUT);            timeout = 1000*  ((Number)timeoutObj).intValue();        } catch (ClassCastException ccex) {            throw SmartFrogResolutionException.illegalClassType(                Reference.fromString(SmartFrogCoreKeys.SF_PROCESS_TIMEOUT),                sfCompleteNameSafe(),                timeoutObj,                timeoutObj.getClass().getName(),                "java.lang.Integer");        }        // Start process        Process process = startProcess(name, cd);        if (process != null) {            // IMPORTANT COMMENT: We loose track of this two threads.            // May be we should be keep a reference to them and later on            // clean them nicely.            // Two gobblers will redirect the System.out and System.err to            // the System.out of the any error message?            StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(),                    "err");            // any output?            StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream(),                    "out");            // kick them off            errorGobbler.setName(name+".errorGobbler");            outputGobbler.setName(name+".outputGobbler");            errorGobbler.start();            outputGobbler.start();        }        try {            // Wait for new compound to appear and try to return it            ProcessCompound newPc = (ProcessCompound) sfResolveHereOrWait(name, timeout);            if (sfLog().isDebugEnabled()){                try {                    sfLog().debug("New ProcessCompound "+name+" created: "+ newPc.sfCompleteName());                } catch (Throwable thr) {                    sfLog().debug("New ProcessCompound "+name+" created.");                    thr.printStackTrace();                }            }            return newPc;        } catch (Exception ex) {            // failed to find new compound. Destroy process and re-throw            // exception            process.destroy();            throw ex;        }    }