无法从cselement运行xmlpost

时间:2012-02-24 10:56:03

标签: fatwire

我无法在cselement中使用javacode运行简单的xmlpost操作来编辑资产。当我在java类中放入相同的代码并从命令提示符运行它时,将所有必需的jar文件放在classpath中。而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>

0 个答案:

没有答案