I'm attempting to incorporate ckfinder into my Apache/Tomcat system. The problem I have is that when the Configuration file attempts to read the configuration.xml, it returns the nodes just fine, but calling getTextContent on the nodes throws an exception. I have run the exact same code through a local class and it works fine. It's only when trying to call the file through the website that it fails.
File file = new File(getFullConfigPath());
this.lastCfgModificationDate = file.lastModified();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(file);
doc.normalize();
Node node = doc.getFirstChild();
logger.severe("init node - " + node);
logger.severe("init value - " + node.getTextContent());
In this case, my output will get display the config node, but will throw an exception when it attempts the value line. The same happens if I try it on a child instead of the config node. I've attempted feeding it a relative URL, but it doesn't find the file, and an absolute URL gets an SSLHandshakeException since I'm using a secure server.
It seems odd that I can get the nodes fine, but not the contents of them. Does anybody know how to fix this?