Hi! I am leveraging the velocityEngine to do some flat file provisioning and when I try to have it get the file template for a given role stored in a txt file on the IIQ server it generates an error that contains the proper target file path saying “Unable to find resource : filepathUrl”. Now if I take the filepath URL and slap it into a file explorer window the txt file pulls right up. So that being said, I think its more of a configuration issue in my code causing it to not look for the right object type maybe? My current code snip is below:
VelocityEngine velocityEngine = new VelocityEngine();
VelocityContext velocityContext = new VelocityContext();
Properties props = new Properties();
//props.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
//props.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
props.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.FileResourceLoader");
props.setProperty("file.resource.loader.path", "C:\\Program Files\\feed\\SER_Templates");
props.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.NullLogSystem");
velocityEngine.init(props);
AttributeRequest epicSERTemplate = accountRequest.getAttributeRequest("epicSERTemplate");
String v_epicSERTemplate = epicSERTemplate.getValue();
template = velocityEngine.getTemplate("C:\\Program Files\\feed\\SER_Templates\\" + v_epicSERTemplate + ".vm");