Consultor Eletrônico



Kbase 18445: Apptivity - NullPointerException When Starting Application
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/17/2004
Status: Unverified

FACT(s) (Environment):

Apptivity

SYMPTOM(s):

NullPointerException when starting application

CAUSE:

Frequently, getting a NullPointerException at startup of an application is due to a timing issue: the application is attempting to access a Data Source before the Data Source is ready.

FIX:

The method abEnv.blockOnInitComplete() blocks the current thread until the application's initialization of the server session is complete.

So to avoid the NullPointerException, in the application's init() method, immediately before the project is initialized by the line:

prj.init();

insert the following line:

theApp().blockOnInitComplete();