JXTA JXSE 2.7 破坏了 JBoss Netty 库依赖性
最近我在研究要使用的 p2p 框架,并遇到了 JXTA。不幸的是,Oracle 决定放弃 JXTA。对于一个好的软件来说真是可惜。无论如何,我遇到的问题是尝试以集合模式启动节点。
NetworkManager 管理器 = new NetworkManager(NetworkManager.ConfigMode.RENDEZVOUS,...);
当我调用 manager.startNetwork(); 时,我收到 NoClassDefFoundError;
有问题的类是: org/jboss/netty/channel/socket/httptunnel/HttpTunnelClientChannelFactory
JXSE 2.7 附带 JBoss netty 3.1.5 GA jar 文件。而且 Netty 的那个版本中确实没有这样的类。
有没有人成功运行 JXSE 会合节点以及使用 JXSE 2.7 的正确 Netty jar 文件应该是什么?
Recently I was investigating p2p framework to use and I came across JXTA. Too bad, Oracle decided to dropped JXTA. Real shame for a nice software. Anyway the problem that I have is trying to start a node in rendezvous mode.
NetworkManager manager = new NetworkManager(NetworkManager.ConfigMode.RENDEZVOUS,...);
I'm getting a NoClassDefFoundError when I call manager.startNetwork();
The class it is having problem with is:
org/jboss/netty/channel/socket/httptunnel/HttpTunnelClientChannelFactory
JXSE 2.7 came with JBoss netty 3.1.5 GA jar file. And there is really no such a class in that release of Netty.
Has anyone successfully ran a JXSE rendezvous node and what should be the right Netty jar file with JXSE 2.7?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试试这个jar文件:http://files.cnblogs.com/cuizhf/httptunnel-0.92.rar
try this jar file :http://files.cnblogs.com/cuizhf/httptunnel-0.92.rar
以下是如何构建一个 netty JAR,其中包含正确的类集来运行 JXSE 2.7:
从此处下载 git 存储库:
https://github.com/iainmcgin/netty
(我刚刚获取了 zip 文件)
使用 maven 构建它:
构建对我来说失败了,我必须在 pom.xml 文件中添加以下 XML
标签:
<插件存储库>
<名称>JBoss Repo
我从 maven 收到另一条失败消息,但它似乎在名为 target 的子文件夹中创建了 jar 文件。
最后一步是确保运行 JXTA 程序时刚刚构建的 jar 文件 maven 位于类路径中。 (该文件名为 netty-4.0.0.Alpha1-SNAPSHOT.jar)。
Here is how you can build a netty JAR with the correct set of classes in it to run JXSE 2.7:
Download the git repository from here:
https://github.com/iainmcgin/netty
(I just grabbed the zip file)
Build it using maven:
The build failed for me and I had to add the following XML to the pom.xml file, before the
</project> tag:
<pluginRepositories>
<pluginRepository>
<id>JBoss Repo</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<name>JBoss Repo</name>
</pluginRepository>
</pluginRepositories>
I got another fail message from maven, but it seemed to create the jar file OK in a subfolder named target.
Final step is to make sure the jar file maven just built is in your classpath when running your JXTA programs. (the file is called netty-4.0.0.Alpha1-SNAPSHOT.jar).
是的,我确实做到了。依赖项可在此处获取。在我看来,依赖项可能不在您的类路径上。
Yes, I sure did. The dependencies are available here. It seems to me that the dependencies may not be on your class path.