当尝试在Apache Karaf OSGi容器中安装httpclient-osgi 4.3.2软件包(org.apache.httpcomponents:httpclient-osgi:bundle:4.3.2,如HC站点上指定)时,我收到以下错误报告:
karaf@root> install mvn:org.apache.httpcomponents/httpclient-osgi/4.3.2
Bundle ID: 60
karaf@root> start 60
Error executing command: Error starting bundles:
Unable to start bundle 60: Unresolved constraint in bundle
org.apache.httpcomponents.httpclient [60]: Unable to resolve 60.0:
missing requirement [60.0] osgi.wiring.package;
(&(osgi.wiring.package=org.apache.http.concurrent)(version>=4.3.0)
(!(version>=4.4.0)))
Run Code Online (Sandbox Code Playgroud)
在检查标头时,似乎它尝试加载的依赖项被标记为Private-Package,并且可以在包JAR中找到类:
karaf@root> headers 60
Run Code Online (Sandbox Code Playgroud)
=>
...
Private-Package =
org.apache.commons.codec,
org.apache.commons.codec.binary,
org.apache.commons.codec.digest,
org.apache.commons.codec.language,
org.apache.commons.codec.language.bm,
org.apache.commons.codec.net,
org.apache.http,
org.apache.http.annotation,
org.apache.http.concurrent,
org.apache.http.config,
org.apache.http.entity,
org.apache.http.impl,
org.apache.http.impl.entity,
org.apache.http.impl.io,
org.apache.http.impl.pool,
org.apache.http.io,
org.apache.http.message,
org.apache.http.osgi.impl,
org.apache.http.params,
org.apache.http.pool,
org.apache.http.protocol,
org.apache.http.util
Run Code Online (Sandbox Code Playgroud)
同时,org.apache.http*也被定义为Import-Package …
我已使用ServerServlet机制将我们的Restlet服务部署到Jetty Java Application服务器.一些服务是从GWT前端调用的,但我还需要直接从我们的服务器逻辑中调用它们.
该的Restlet RIAP系统似乎为这个完美的,但我不知道如何在这里使用.似乎我需要以某种方式阻止Restlet组件的Context.
我发现一个帖子表明RiapServerHelper对此很有用.但我没有找到关于如何使用它的文档.任何例子都会有所帮助.