jxse2.7存在的问题

1 官方提供的依赖包不完整

     这里官方提供的依赖包是指http://sourceforge.net/projects/practicaljxta/files/中的lib-dependencies-2.7.zip

     设置后classpath后运行,会发现抛出异常java.lang.ClassNotFoundException: org.jboss.netty.channel.socket.httptunnel.HttpTunnelClientChannelFactory

     在论坛上找到解决方法(非官方):加入一个依赖包httptunnel-0.92.jar,我会在本贴中放入该文件的下载链接。

     注意httptunnel-0.92.jar本身依赖netty-3.1.5.GA.jar,这在Netbeans RCP的开发中可能会造成一点小麻烦,设置好依赖即可。

 httptunnel-0.92.rar

 

2 这是最近遇到的一个问题,当使用自定义服务时, 抛出异常net.jxta.exception.ServiceNotFoundException: Not found: urn:jxta:cbid-D34E...B505

我用之前一个帖子中发布的代码测试(http://www.cnblogs.com/cuizhf/archive/2011/08/23/2151054.html中的JxtaServiceExample.),在jxse2.6通过,但在jxse2.7中抛出上诉异常。

在网络上收罗一天,尝试了n中办法,也没有解决。 而且这个问题似乎在2.5之前的版本也时常出现,但都不大能解决,并且几乎没有明确的原因,似乎有点莫名奇妙的错误。

 

3 调用NetworkManager.stopNetwork()后,后台线程不停止,导致程序无法退出。

嗯,这个似乎是自jxse2.5以来就存在的老问题了,据开发文档声称,2.7版采用了新版的http实现,已经解决了该问题。但是我测试后发现仍然是老样子。也有可能是我测试代码有问题,但网上这方面的资料,尤其是2.7版的,太少了。

 

 

 

总之,感觉2.7版有一些问题,不能解决的话,之后在开发的时候尽量避开这些问题!

_______________________________________________________________________________

 

后续:

 

嗯,第二个问题通过跟踪源码已经基本解决,有时间再更新本帖,给出解决方法。

第三个问题有一个临时的解决方法,就是在程序结束前调用System.exit(0),这样程序就会马上退出,就是不知道这样做有没有啥副作用。
 ——————————————————————————————————————————

 下面是我修改过的jar包,可以解决第二个问题,下载后需去掉.txt扩展名

 *******************************************************************

另一个问题,设置结点ID为固定ID时,由于默认PSEMembershipService引起的问题,这个暂时没有解决方法。

建议实际开发还是使用v2.6版,v2.7版作为参考用。

转载于:https://www.cnblogs.com/cuizhf/archive/2011/08/24/2152073.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
此资源包含三部分: 1、jxse-shell-2.5.zip 2、jxse-shell-doc-2.5.tar.tar 3、jxse-shell-src-2.5.tar.tar ===附上linux下使用jxtashell的说明=== (windows用户参加jxse-shell-src-2.5/win32/Jxta_Readme.html说明) Linux具体步骤如下: leekwen@leekwen:~$ unzip jxse-shell-2.5.zip leekwen@leekwen:~$ cd jxse-shell-2.5/ leekwen@leekwen:~/jxse-shell-2.5$ ls lib shell leekwen@leekwen:~/jxse-shell-2.5$ cd shell/ leekwen@leekwen:~/jxse-shell-2.5/shell$ ls jxta.exe Jxta_Readme.html run.bat runjdk.bat run.sh leekwen@leekwen:~/jxse-shell-2.5/shell$ chmod a+x run.sh leekwen@leekwen:~/jxse-shell-2.5/shell$ ./run.sh ........ ============================================= =======<[ Welcome to the JXTA Shell ]>======= ============================================= ........ JXTA> man The following commands are available: Shell JXTA Shell command interpreter cat Concatenate and display a Shell object chpgrp Change the current peer group clear Clear the shell's screen dumpcm Dump the content of the local cache (CM) env Display environment variables exit Exit the Shell exportfile Export enviroment variable to an external file flush flush a jxta advertisement get Get data from a pipe message grep Search for matching patterns groups Discover peer groups help To access help pages use the 'man' command. history No description available for this ShellApp importfile Import an external file info display info about an jxta advertisement instjar Installs jar-files containing additional Shell commands join Instantiate and join peer group leave Resign from and optionally stop a peer group logging Display and optionally adjust logging levels login Authenticate with the group's membership service. man An on-line help command that displays information about a specific Shell command mem Display memory information mkadv Make an advertisement from a document mkmsg Make a pipe message mkpipe Create a pipe more Page through a Shell object or from standard input. newmoduleclass Create a new Module Class advertisment newmodulespec Create a new Module Class advertisment newpgrp Create a new peer group advertisement newpipe Create a new pipe advertisment peerconfig Force Peer Reconfiguration peerinfo Get information about peers peers Discover peers pse.certs Display the certificates contained in the current group's PSE Membership pse.createkey Creates a key in the PSE key store pse.dumpcred Dumps a credential. pse.dupkey Creates a key in the PSE key store pse.erase Erases a key or certificate from the PSE key store pse.importcert Imports a trusted certificate chain. pse.keys Display the keys contained in the current group's PSE Membership pse.newcsr Generates certificate signing request document. pse.signcsr Signs a certificate signing request pse.status Display status infomation for the group's PSE Membership publish Publish a JXTA advertisement put Put data into a message rdvcontrol Controls rendezvous service behaviour rdvserver No description available for this ShellApp rdvstatus Display information about the rendezvous service recv Receive a message from a pipe relaystatus Display the list of relays and clients connected to this peer. remotepublish remote publish a jxta advertisement route Display information about a peer's route info rsh Connects to a remote JXTA Shell rshd Remote JXTA Shell Deamon search Discover jxta advertisements send Send a message into a pipe set Set an environment variable sftp Send a file to another peer share Share an advertisement sleep Sleep for a specified amount of milliseconds storehome Display the location of store home talk Talk to another peer transports Display information about the message transports available in the current group uninstjar Uninstalls jar-files previously installed with 'instjar' unset Removes an environment variable version Display the version number of this Shell instance. wc Count the number of lines, words, and chars in an object who Display credential information whoami Display information about this peer or the current peergroup xfer Send a file to another peer
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值