Hi all,
I've fixed the problem by changing the code to ignore nulls while parsing the inputStream. See following code extract changes in bold).
The fix works but I'm I have not gone deeper to find out why the nulls appeared when they were not there before!!
Maybe someone can look at my fix and debug the real issue and update jabox.
Jabox.log
INFO [org.jabox.webapp.menubuttons.StartContainerButton] Starting container: Default
INFO [org.jabox.model.Container] Starting Servlet Container
INFO [org.jabox.utils.SettingsModifier] pair.getValue() = null
INFO [org.jabox.utils.SettingsModifier] pair.getValue() = null
INFO [org.jabox.utils.SettingsModifier] pair.getValue() = null
package org.jabox.utils;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.wicket.util.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SettingsModifier {
private static final Logger LOGGER = LoggerFactory
.getLogger(SettingsModifier.class);
public static String parseInputStream(final InputStream is,
Map<String, String> values) throws IOException {
StringWriter writer = new StringWriter();
IOUtils.copy(is, writer);
String theString = writer.toString();
String replace = theString;
for (Entry<String, String> pair : values.entrySet()) {
if (pair.getValue()!=null)
replace = replace.replace(pair.getKey(), pair.getValue());
LOGGER.info(" pair.getValue() = " + pair.getValue());
}
return replace;
}
}
NJoy :)
Dennis