当我尝试使用 createquery api 查询队列以获取队列元素时,我遇到了一个问题。
我在 while 语句中收到错误,将以下错误声明为
errorjava.lang.illegalstateexception : 未读块数据
我不知道为什么我会收到这个错误。我可以使用 fetchcount() api 来获取队列中工作项的计数,但是 haveext() api 不起作用,next() 也不起作用。
这个语句没有被执行有什么原因。这与任何java问题有关吗?任何人都可以帮助
代码是
VWSession session = new VWSession();
session.setBootstrapCEURI(Ceuri);
session.logon(cename, fnPassword, connectionPoint);
VWQueue queue = session.getQueue(queue));
int queryFlag = VWQueue.QUERY_NO_OPTIONS;
int fetchType = VWFetchType.FETCH_TYPE_STEP_ELEMENT;
VWQueueQuery queueQuery = queue.createQuery(null,null, null,queryFlag, null, null, fetchType);
while (queueQuery.hasNext()) {
queueElement = (VWStepElement) queueQuery.next();
}