我正在执行以下代码:
String queString = "some query string"
Query q1 = em.createNativeQuery(queString, T03CallsLog.class);
T03CallsLog newCall;
newCall = (T03CallsLog) q1.getSingleResult(); //this line cause the exception after the first time
奇怪的情况。 如果我只使用一个实例执行它,那么它可以正常工作,但是如果我并行地使用多个实例(mdb),那么第一个实例会在没有任何异常的情况下被执行,而所有其余的实例都会出现这个错误:
10:04:50,750 ERROR [log] ECMSDispatcherMdb.onMessage, error: No entity found for query
有什么想法会导致这种情况?为什么第一次能运行,但其余所有实例都不能?
谢谢,
雷。