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

Bug 351445

Summary: RWT OSGi integration does not work when IEntryPoint is an inner class
Product: [RT] RAP Reporter: Holger Staudacher <holger.staudacher>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: fr.appel
Version: 1.5   
Target Milestone: 2.0 M1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Example Project none

Description Holger Staudacher CLA 2011-07-07 09:28:37 EDT
We registered a Configurator instance as an OSGi service. In the Configurator implementation we added an EntryPoint within the configure method. We called addEntryPoint on the context and passed the class of our Entrypoint. The IEntryPoint implementaion was an inner class of the Configurator Impl. When starting this up and calling the EntryPoint we received an HTTP 500 and an Exception with the root cause "NoSuchMethodError". The problem was solved after moving the EntryPoint to a separate file.
Comment 1 Frank Appel CLA 2011-07-08 02:03:14 EDT
Was your inner class declared as static? If not, there's probably nothing we can do about it, since the IEntryPoint instance is created using reflection. And it would be a problem of the EntryPointManager anyway. So it would be helpful to have a Configurator example that makes this problem reproducable. If my assumptions are right there might be a possibility to provide a more speaking error message, but that would all I can think of at the moment...
Comment 2 Holger Staudacher CLA 2011-07-08 04:08:22 EDT
Created attachment 199311 [details]
Example Project

I attached an example project to reproduce this error. You are right, the inner class was not static. The archived project contains a launch config which starts on port 9292. You can use the entry point name "osgi". HTH

+1 for a more speakable error message.
Comment 3 Ralf Sternberg CLA 2012-05-31 07:33:38 EDT
Added meaningful exception messages in 6b2f8ec87fec211de25300e43b44a21f9176f654.