Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » NullPointerException in UISessionBuilder after launching Site in Browser(UISession, UISessionBuilder, NullPointerException, Browser)
NullPointerException in UISessionBuilder after launching Site in Browser [message #1008076] Fri, 08 February 2013 14:11 Go to next message
Roland Schuster is currently offline Roland Schuster
Messages: 3
Registered: February 2013
Junior Member
Hi,

i get an NullPointerException in the class UISessionBuilder when launching my RAP App in the Browser (@See: exception.png).
It happens just the first time ater the start of the application. When i refresh afterwards i get a correct RAP protocol message. (@See: message.png)

I'm using Concierge OSGi on top of an RTSJ-JVM called JamaicaVM. I use Jetty 6.1.x as HttpService implementation and a ServiceListener on the HttpService.
After the HttpService is registered i use the ApplicationLauncher to launch my ApplicationConfiguration. See Code below:

@Override
public void serviceChanged(ServiceEvent event) {
	if (event.getType() == ServiceEvent.REGISTERED) {
		registerRAPServlet(event.getServiceReference());
	} else if (event.getType() == ServiceEvent.UNREGISTERING) {
		unregisterRAPServlet();
	}
}

private void registerRAPServlet(ServiceReference httpServiceRef) {
	httpService = (HttpService) context.getService(httpServiceRef);

	ServiceReference launcherRef = context.getServiceReference(ApplicationLauncher.class.getName());
	launcherService = (ApplicationLauncher) context.getService(launcherRef);

	ApplicationConfiguration configuration = new ARTOScopeRAPConfig();
	reference = launcherService.launch(configuration, httpService, null, "artos", "plugins/jetty/");
}

private void unregisterRAPServlet() {
	reference.notifyAll();
	reference.stopApplication();
}


There is no console output about an exception during the launch()-call. Just after calling the URL in the Browser i get that NullPointerException.
I think there might be any problem with the UISession but don't know which. Can somebody help me?

Many Thanks!
Roland
  • Attachment: exception.png
    (Size: 135.61KB, Downloaded 60 times)
  • Attachment: message.png
    (Size: 9.52KB, Downloaded 59 times)
Re: NullPointerException in UISessionBuilder after launching Site in Browser [message #1008418 is a reply to message #1008076] Tue, 12 February 2013 07:18 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

Hi Roland,

apparently, the ApplicationContext is null in your stacktrace. This
should not happen under normal conditions, the application context is
stored in the servlet context in ApplicationRunner#start. I guess that
this issue is related to your environment. Could you open a bug report
[1] and help us tracking it down?

Thanks,
Ralf

[1] https://bugs.eclipse.org/bugs/

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: NullPointerException in UISessionBuilder after launching Site in Browser [message #1008519 is a reply to message #1008418] Tue, 12 February 2013 14:57 Go to previous messageGo to next message
Roland Schuster is currently offline Roland Schuster
Messages: 3
Registered: February 2013
Junior Member
I have created a bug report: Bug 400610
Re: NullPointerException in UISessionBuilder after launching Site in Browser [message #1009322 is a reply to message #1008076] Thu, 14 February 2013 17:32 Go to previous message
Roland Schuster is currently offline Roland Schuster
Messages: 3
Registered: February 2013
Junior Member
After getting rid of the first there is another NullPointerException that occures when i launch the App in the Browser. See Bug 400857
Previous Topic:GMF in RAP 2.0?
Next Topic:Adding composite above menubar when using PlatformUI.createAndRunWorkbench(display, advisor)
Goto Forum:
  


Current Time: Fri Aug 29 08:30:49 EDT 2014

Powered by FUDForum. Page generated in 0.02857 seconds