I have new version of TeamSIte on Linux environment 7.4.1. I am trying to generate html file using xsl though java code.
I am able to generate html/jsp using standalone java code from my windows system but same code when I am using through my workflow it is not generating and giving error the file or directory is not available or permissions denied.
//bvasndd04.ilg.ad/default/main/ecommerce/IntervalWorld/WORKAREA/Common/ii/employment1.jsp
The below standalon ecode I am using to generate html file from my local machine
final TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer;
FileOutputStream oFs =
null;
try {
String xml=
"/Users/c_gbarala/Desktop/html/posting";
String xsl=
"/Users/c_gbarala/Desktop/html/employment.xsl";
String output=
"/Users/c_gbarala/Desktop/html/test.jsp";
oFs =
new FileOutputStream(output);
transformer = tFactory.newTransformer(
new StreamSource(xsl));
// Transforming the XML using the XSL into the output file format
transformer.transform(
new StreamSource(xml), new StreamResult(oFs));
}
catch (Exception exception) {
exception.printStackTrace();
}
When I am using this in my urlexternal task and passing xml, xsl, output from CSSDK code it is not working. It is giving error as below
2014-11-25 10:48:34,127 [http-0.0.0.0-8080-14] ERROR com.interval.cms.service.GenerateHtml () - /bvasndd04.ilg.ad/default/main/ecommerce/IntervalWorld/WORKAREA/Common/ii/employment.jsp (No such file or directory)
try
{
logger.info("Start GenerateHTML");
templatedata_path = task.getVariable("templatedata_path");
dcr_type = task.getVariable("dcr_type");
dcr_name = task.getVariable("dcr_name");
logger.info(new StringBuffer("The Template type is: ").append(templatedata_path));
logger.info(new StringBuffer("The dcr_type is: ").append(dcr_type));
logger.info(new StringBuffer("The dcr name is: ").append(dcr_name));
final String initialWorkArea = task.getArea().getVPath().toString();
logger.info(new StringBuffer("DCR Relative path is").append(initialWorkArea).toString());
final String dcrDefaultPath = new StringBuffer(initialWorkArea).toString();
final String xslFilePath = "/presentation/employment.xsl";
final String outputFilePath = new StringBuffer(initialWorkArea).toString();
String xml =
new StringBuffer(dcrDefaultPath).append("/").append(templatedata_path).append("/data/").append(dcr_name).toString();
String xsl =
new StringBuffer(dcrDefaultPath).append("/").append(templatedata_path).append(xslFilePath).toString();
String output =
new StringBuffer(dcrDefaultPath).append("/").append("/ii/employment.jsp").toString();
oFs = new FileOutputStream(output);
transformer = tFactory.newTransformer(
new StreamSource(xsl));
// Transforming the XML using the XSL into the output file format
transformer.transform(
new StreamSource(xml), new StreamResult(oFs));
task.chooseTransition(task.getTransitions()[0],
"Going to next Task");
logger.info("working fine");
Please let me know what may be the issue. Any pointers. This same code i used when I installed TeamSite on windows and replace the server name with Y drive and able to generate html but not in linux.....