当前位置: 代码迷 >> Java相关 >> RAP开发入门-开发札记-bug记录
  详细解决方案

RAP开发入门-开发札记-bug记录

热度:94   发布时间:2016-04-22 20:08:08.0
RAP开发入门-开发笔记-bug记录

NamespaceException: The alias '/rwt-resources' is already in use

  该bug发生的第一种情况是:

This means that more than one application is started in the same context and in the same HttpService. When different applications run in the same HttpService, they have to use different context paths.

This also happens when an ApplicationConfiguration is registered AND the org.eclipse.rap.workbench bundle is running (see bug 377414).

To register an ApplicationConfiguration on a custom context using declarative services, add the following line to the service component definition:

  <property name="contextName" type="String" value="example"/>

See also ApplicationLauncher#PROPERTY_CONTEXT_NAME.

https://wiki.eclipse.org/RAP/FAQ#NamespaceException:_The_alias_.27.2Frwt-resources.27_is_already_in_use

  意思就是RAP运行在容器中的,但是你一个容器不弄同时跑两个RAP应用,主要是一个应用,多个bundle的情况会发生这种问题。

  补充描述告诉我们一个容器中Application的处理方式“ApplicationConfiguration on a custom context using declarative services”,那就好办了,我们找到容器中定义service的地方,把service去掉就行了

  方案:找到MANIFEST.MF去掉contribution.xml(services定义在这)的加载;

  第二种情况:

  新插件(bundle)加载的冲突,如果希望用e4里边的控件的话,问题可能就在这bundle里面,解决方案还是得求老外ㄒoㄒ:

this is because both org.eclipse.e4.ui.workbench and org.eclipse.rap.ui.workbench exists. You should remove the org.eclipse.rap.ui.workbench.

http://www.postseek.com/meta/2f8c97b62bcde5119f8225d93db3bc1d

  eclipse bug 库里面也确定了这个bug:https://bugs.eclipse.org/bugs/show_bug.cgi?id=369657

 

  相关解决方案