解决方案 »

  1.   

    楼主请参考http://blog.csdn.net/icecream0/article/details/7579496
      

  2.   

    http://bill-xing.iteye.com/blog/793412这个链接的清单10中写道:如果无法连接上 http://struts.apache.org/,那么在加载 Struts 的 bundle 时也将会出错,因为 bundle 与 Web Application 的 lib 的加载路径不一致,无法从 Web Application 的 lib 下面找到 XXX.dtd 文件。我按照这个去修改了,把"http://struts.apache.org/dtds/struts-2.0.dtd"直接改为本地的dtd,没用;
    还试了一种方法:在prefreces->catalog中添加"http://struts.apache.org/dtds/struts-2.0.dtd"与本地dtd关联,但是最后也没用。
    本来这样改了dtd之后,应该在struts2.xml中有提示的啊,但是也没有提示。然后在https://github.com/cenobites/struts2-json-plugin中提到:
    To fix this add this line to MANIFEST.MF:DynamicImport-Package: es.cenobit.struts2.json.annotations
    Or if using The Apache Felix maven plugin (see below for details):<DynamicImport-Package>es.cenobit.struts2.json.annotations</DynamicImport-Package>试着改了一下,也是没用!望高手解答啊!!
      

  3.   

    我将struts的包换成2.3.4,包括struts-ogsi-plugin也换成2.3.4.这个错就没了,用struts2.3.16发现拿不到相关jar的version。在FelixOsgiHost的addExportedPackages方法中,你可以debug下。