Forgot to mention, the fix is against JIRA UIMA-1727<https://issues.apache.org/jira/browse/UIMA-1727> * * <https://issues.apache.org/jira/browse/UIMA-1727>*Jerry C * On Mon, Jan 18, 2010 at 4:22 PM, Jaroslaw Cwiklik <[email protected]> wrote:
> Rad, there was a bug in the CPM that I just fixed. The CPM was not checking > for null before adding a listener to an internal list. This led to the NPE > as you've reported. The new code should work now. If you dont want to update > from the SVN just dont call the addStatusCallbackListener(null). This would > be a workaround for the problem. > > Jerry C > > > On Mon, Jan 18, 2010 at 3:59 PM, Radwen ANIBA <[email protected]> wrote: > >> just before mCPE.process() i've added these >> >> StatusCallbackListener listner = null ; >> mCPE.addStatusCallbackListener(listner); >> >> Is this wrong ? >> >> 2010/1/18 Jaroslaw Cwiklik <[email protected]> >> >> > Rad, looks like a bad reference to the Callback Listener: >> > >> > ArrayList statusCbL = cpEngine.getCallbackListeners(); >> > // Notify all listeners that the CPM has finished processing >> > for (int j = 0; j < statusCbL.size(); j++) { >> > BaseStatusCallbackListener st = (BaseStatusCallbackListener) >> > statusCbL.get(j); >> > if (!killed) { >> > st.collectionProcessComplete(); >> > } else { >> > st.aborted(); >> > } >> > } >> > >> > Line 537: st.collectionProcessComplete(); >> > >> > Do you plug in a listener to the CPM? >> > >> > Jerry C >> > >> > On Mon, Jan 18, 2010 at 3:42 PM, Radwen ANIBA <[email protected]> >> wrote: >> > >> > > Hi , >> > > >> > > My application run without any problem except at the end it shows this >> > > message and I don't really know why >> > > >> > > Exception in thread "BaseCPMImpl-Thread" >> java.lang.NullPointerException >> > > at >> > > >> org.apache.uima.collection.impl.cpm.BaseCPMImpl.run(BaseCPMImpl.java:537) >> > > at java.lang.Thread.run(Thread.java:619) >> > > >> > > And the process do not finish till I kill it >> > > >> > > Any idea ? >> > > >> > > Rad >> > > >> > >> > >
