Hi,
We have recently migrated to TS 16.2 from TS 7.2 on Windows server 2012.
We have one custom workflow where we have one task in which is parsing XML file using the below code:
File f = new File(task.getArea().getFile(new CSAreaRelativePath("page_sitemap.xml")).getVPath().toString());
Document dcrDoc = Dom4jUtils.newDocument(f);
if (dcrDoc != null) {
LOGGER.warn("[execute] in if dcrDoc");
try {
String xmlStr = dcrDoc.asXML();
LOGGER.warn("xmlStr: " + xmlStr);
}
catch (Exception e) {
LOGGER.warn("check sitemap version: " + e);
try {
task.chooseTransition("ProcessSiteMap Failure", "Failure fixing ProcessSitemap");
LOGGER.warn("Failed Transition complete");
}
catch (Exception et){
LOGGER.error(et.getMessage());
}
}
Above piece is code is working fine in old server(TS 7.2 ) but in new TS 16.2 it is always going to catch block and after putting the more loggers I found out that somehow Document dcrDoc = Dom4jUtils.newDocument(f); have an issue.
As far as XML is concerned, XML is well formatted and valid. I was wondering whether I am having this issue due to some missing jar?
I have very limited knowledge of JAVA so I would really appreciate any kind of help on this issue.
Thanks,
NK