Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 476357

Summary: NullPointerException in LifeCycleServiceHandler on HTTP Session Timeout
Product: [RT] RAP Reporter: Beat Kappert <beat.kappert>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Stack trace seen in Eclipse Console after HTTP session timeout in RAP application none

Description Beat Kappert CLA 2015-09-01 11:34:22 EDT
Created attachment 256298 [details]
Stack trace seen in Eclipse Console after HTTP session timeout in RAP application

Our simple RAP application produces the attached stack trace when a widget is clicked after the HTTP session timeout has been reached.

(It was suggested that I file a bug report in this thread http://stackoverflow.com/questions/32300576/handling-http-session-timeout-and-redirect-in-eclipse-rap-application)

To reproduce the problem more quickly I have registered the following listener in web.xml:
public class NwbHttpSessionListener implements HttpSessionListener {
  @Override
  public void sessionCreated(HttpSessionEvent event) {
    event.getSession().setMaxInactiveInterval(10); // timeout after 10 seconds
  }
...
}

These Gradle dependencies should illustrate the versions used:

dependencies {
  compile files('lib/org.eclipse.core.commands_3.7.0.v20150422-0725.jar', 
		'lib/org.eclipse.core.runtime_3.11.0.v20150405-1723.jar', 
		'lib/org.eclipse.equinox.common_3.7.0.v20150402-1709.jar', 
		'lib/org.eclipse.rap.jface_3.0.0.20150520-1729.jar', 
		'lib/org.eclipse.rap.rwt_3.0.0.20150525-1014.jar',
		'lib/org.eclipse.rap.filedialog_3.0.0.20150529-1303.jar',
		'lib/org.eclipse.rap.fileupload_3.0.0.20150520-1707.jar')
  compile 'org.glassfish.jersey.bundles:jaxrs-ri:2.17'
  compile 'org.glassfish.jersey.media:jersey-media-moxy:2.9.1'
  compile 'javax.servlet:javax.servlet-api:3.1.0'
  compile 'commons-fileupload:commons-fileupload:1.3.1'
  testCompile 'junit:junit:4.+'
  testCompile "org.mockito:mockito-core:1.+"
}
Comment 1 Ivan Furnadjiev CLA 2015-09-02 03:23:06 EDT
You are not using the release version of RAP 3.0 (which has bundle org.eclipse.rap.rwt_3.0.0.20150601-1556.jar). This issue has been fixed in RAP 3.0RC4 with change https://git.eclipse.org/r/#/c/49000/.
Comment 2 Beat Kappert CLA 2015-09-02 05:15:46 EDT
Great, thanks, the new version solves the problem!