Bug 400610 - NullPointerException in UISessionBuilder after launching Site in Browser
Summary: NullPointerException in UISessionBuilder after launching Site in Browser
Status: CLOSED WORKSFORME
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2013-02-12 13:24 EST by Roland Schuster CLA
Modified: 2016-01-04 08:16 EST (History)
1 user (show)

See Also:


Attachments
StackTrace of the Exception (135.61 KB, image/png)
2013-02-12 13:24 EST, Roland Schuster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Schuster CLA 2013-02-12 13:24:24 EST
Created attachment 226940 [details]
StackTrace of the Exception

I get an NullPointerException in the class UISessionBuilder when launching my RAP App in the Browser. It happens just the first time after the start of the application. When i refresh afterwards i get a correct RAP protocol message.

I'm using Concierge OSGi on top of an RTSJ-JVM called JamaicaVM. As HttpService i use Jetty 6.1.x.
Comment 1 Ralf Sternberg CLA 2013-02-14 11:44:57 EST
Since we probably cannot replicate your environment, could you help us narrowing it down? For example, could you try to reproduce the problem with a different VM, and/or with a different OSGi container?
Comment 2 Roland Schuster CLA 2013-02-14 16:22:36 EST
I have solved this issue. The ApplicationContext is not null in the ApplicationRunner#start. It is null in the ContextProvider#getUISession after the handling of the request in RWTServlet#handleValidRequest.
So i replaced the lines 192 and 193 in ContextProvider#getUISession:

	ServletContext servletContext = httpSession.getServletContext();
	ApplicationContextImpl applicationContext = ApplicationContextUtil.get( servletContext );

with the following line:

	ApplicationContextImpl applicationContext = getContext().getApplicationContext();

That solved the problem for me. Don't know exactly what the problem is and if it's the best solution but for now it's fine.
Comment 3 Roland Schuster CLA 2013-02-14 17:33:23 EST
After getting rid of the first there is another NullPointerException that occures when i launch the App in the Browser. See Bug 400857
Comment 4 Ivan Furnadjiev CLA 2016-01-04 08:16:03 EST
As there is no response from the reporter I will close it as WORKSFORME. Roland, please reopen if you have more information or snippet to reproduce the issue.