I在Google App Engine中,我的Restlet服务器遵循本教程:http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html它适用于GWT客户端。Restlet jse2客户端资源界面在类加载器中不可见
现在我试图建立一个OSGi和Restlet jse2桌面客户端。
OSGi包中Restlet客户端的代码保持与提供的tutorail相同。
当我开始在OSGi框架菲利克斯我也开始org.restlet.jar捆绑谁的出口Restlet框架包,我开始同捆在toturail给出此代码:
ClientResource cr = new ClientResource("localhost:8888/contacts/123");
// Get the Contact object
ContactResource resource = cr.wrap(ContactResource.class);
Contact contact = resource.retrieve();
的ContactResoure接口在相同的包中包激活,但我仍然得到这个奇怪的消息:java.lang.IllegalArgumentException异常:接口nl.nhl.minor.crm.desktop.restlet.ContactResource是不是从类加载器
可见这个问题涉及OSGi或Restlet?我该如何解决这个问题?
OSGi包的清单文件是由maven bundle插件创建的。
没有找到解决方案,但有关此问题的不同线索(希望获得一些新的见解):https://github.com/restlet/restlet-framework-java/issues/6 – evandor