客户端正在尝试将一些代理查询代码集成到现有的 Web 应用程序中。他们有以下代码:
public String doItNow(int keyA,
String schemaA,
String templateIdA) throws Exception {
loggerInfo("doItNow.start" +
", key:" + keyA +
", schema:" + schemaA +
", templateId:" + templateIdA);
StringBuffer sb = new StringBuffer();
PublicationCriteria pubCriteria = new PublicationCriteria(keyA);
loggerInfo("doItNow.PC:" + pubCriteria);
SchemaTitleCriteria schemaTitleCriteria = new SchemaTitleCriteria(schemaA);
loggerInfo("doItNow.STC:" + schemaTitleCriteria);
AndCriteria andCriteria = new AndCriteria(pubCriteria, schemaTitleCriteria);
loggerInfo("doItNow.AC:" + andCriteria);
Query query = new Query();
loggerInfo("doItNow.Query.0:" + query);
query.setCriteria(andCriteria);
loggerInfo("doItNow.Query.1:" + query);
String[] results = query.executeQuery();
for (String r : results) {
loggerInfo("doItNow.\tres:" + r);
}
ComponentPresentationAssembler cpa = new ComponentPresentationAssembler(keyA);
loggerInfo("doItNow.CPA:" + cpa);
for (String item : results) {
loggerInfo(":>" + item);
sb.append(cpa.getContent(item, templateIdA));
}
return sb.toString();
}
代码执行至创建 Query 对象:
Query query = new Query();
此时它挂起。cd_core 日志文件中没有出现任何错误来说明原因。任何人都可以建议可以调查以进一步调试的领域,或提出解决方案吗?