I am unable to run a simple xmlpost operation for editing an asset using javacode inside a cselement. This works when I put the same code inside a java class and run it from command prompt putting all the nescessary jar files in classpath. Whereas same code in cselement goes into an infinite loop causing the entire csdirect to become unresponsive. I do not get any logs consistently.However once or twice I got the following message in futuretense (but most of the times nothing comes up !!!)
[2012-02-20 21:29:07,542] [logging.cs.cache.resultset] Exception thrown while checking for expired objects.
java.lang.NullPointerException
at COM.FutureTense.Util.ftTimedHashtable.prune(y:1563)
at COM.FutureTense.Util.ftTimedHashtable.CheckForExpired(y:2137)
at COM.FutureTense.Util.T.A(y:1078)
at COM.FutureTense.Util.T.run(y:574
The code in cselement is as follows
<%@ taglib prefix="cs" uri="futuretense_cs/ftcs1_0.tld"
%><%@ taglib prefix="asset" uri="futuretense_cs/asset.tld"
%><%@ taglib prefix="assetset" uri="futuretense_cs/assetset.tld"
%><%@ taglib prefix="commercecontext" uri="futuretense_cs/commercecontext.tld"
%><%@ taglib prefix="ics" uri="futuretense_cs/ics.tld"
%><%@ taglib prefix="listobject" uri="futuretense_cs/listobject.tld"
%><%@ taglib prefix="render" uri="futuretense_cs/render.tld"
%><%@ taglib prefix="searchstate" uri="futuretense_cs/searchstate.tld"
%><%@ taglib prefix="siteplan" uri="futuretense_cs/siteplan.tld"
%><%@ page import="COM.FutureTense.Interfaces.*,
COM.FutureTense.Util.ftMessage,
COM.FutureTense.XML.Post.*,
COM.FutureTense.Util.ftErrors,
java.lang.*,
com.xmlpost.XmlPostInit,com.Test.Test2"
%><cs:ftcs><%-- xmlpostElement
INPUT
OUTPUT
--%>
<%-- Record dependencies for the SiteEntry and the CSElement --%>
<ics:if condition='<%=ics.GetVar("seid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("seid")%>' c="SiteEntry"/></ics:then></ics:if>
<ics:if condition='<%=ics.GetVar("eid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("eid")%>' c="CSElement"/></ics:then></ics:if>
<%String args [] = {"-sD:/xml_post_poc_backup/xml_post_poc_local2/xmlpost_source.xml","-cD:/xml_post_poc_backup/xml_post_poc_local2/xmplpost_config.ini"};
COM.FutureTense.XML.Post.XMLPost poster = new COM.FutureTense.XML.Post.XMLPost();
try {
ics.LogMsg("in try of XMLPost under program control before func call");
ics.LogMsg("abspath "+getServletContext().getRealPath("/"));
poster.doIt(args);
ics.LogMsg("in try of XMLPost under program control successfull");
}catch (Exception e) {
ics.LogMsg("error in XMLPost under program control");
ics.LogMsg("err msg" + e.toString());
}
//new com.xmlpost.XmlPostInit().runXmlPost();
//ics.LogMsg(new com.Test.Test2().doIt());
//out.println(new com.Test.Test2().doIt());
%>
</cs:ftcs>