我无法运行简单的 xmlpost 操作来使用 cselement 中的 javacode 编辑资产。当我将相同的代码放在 java 类中并从命令提示符运行它时,这将起作用,将所有必要的 jar 文件放在类路径中。而 cselement 中的相同代码进入无限循环,导致整个 csdirect 变得无响应。我没有始终如一地收到任何日志。但是有一两次我在将来时收到以下消息(但大多数时候什么都没有出现!!!)
[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
cselement中的代码如下
<%@ 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>