Hi,
the mailing-list is for development related communication only. Please use the newsgroup [1] for questions, support and information exchange between users and developers of RAP. About your question: You can register your service handlers in your application configuration:

public class MyApplication implements ApplicationConfiguration {

  public void configure( Application application ) {
    ...
    application.addServiceHandler( serviceHandlerId, serviceHandler );
  }

}

More information about ApplicationConfiguration here [2].

[1] https://www.eclipse.org/forums/index.php?t=thread&frm_id=34
[2] https://www.eclipse.org/rap/developers-guide/devguide.php?topic=application-configuration.html&version=2.3
Best,
Ivan

On 7/31/2014 3:12 PM, drpadawan wrote:
Hi Everyone,

I have a plug-in with an activator where I want to register my service 
handlers. After moving to RAP 2.3 from RAP 1.4 I'm getting 
InvalidStateException in RWT.getApplicationContext.

What is the best place to register my Service handlers?

Thanks

Root exception:
java.lang.IllegalStateException: Invalid thread access
         at org.eclipse.rap.rwt.RWT.checkContext(RWT.java:733)
         at org.eclipse.rap.rwt.RWT.getApplicationContext(RWT.java:621)
         at org.eclipse.rap.rwt.RWT.getServiceManager(RWT.java:555)
         at 
my.plugin.upload.UploadService.registerServiceHandler(UploadService.java:177)
         at my.plugin.RapActivator.start(RapActivator.java:59)
         at 
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
         at 
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
         at java.security.AccessController.doPrivileged(Native Method)
         at 
org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
         at 
org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
         at 
org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:936)
         at 
org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:319)
         at org.eclipse.osgi.container.Module.doStart(Module.java:571)
         at org.eclipse.osgi.container.Module.start(Module.java:439)
         at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
         at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
         at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
         at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
         at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
         at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
         at 
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
_______________________________________________
rap-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/rap-dev


_______________________________________________
rap-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/rap-dev

Reply via email to