JXTA in a Nutshell by Bernard Travaset, Li Gong, Scott Oaks The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated March 05, 2003. UNCONFIRMED errors and comments from readers: [x] example code: jxtaexamples.jar; Errors found while compiling example code. examples\ch05\RestoPeer\RestoPeer.java Error on line 149, missing comma after mkGroupID() in argument list restoNet = netpg.newGroup( mkGroupID() // Assign new group ID implAdv, // The implem. adv "RestoNet", // Name of peergroup "RestoNet, Inc."); // Description of peergroup examples\ch07\TestSignature.java Error on line 10 and 11 of the import section Read: import jxta.security.impl.publickey.RSAPublickeyData; import jxta.security.impl.publickey.RSAPrivatekeyData; Should Read: import jxta.security.publickey.RSAPublickeyData; import jxta.security.publickey.RSAPrivatekeyData; [5] First paragraph under "Why JXTA?"; This paragraphs mentions "the auctioning example we used at the beginning of this chapter". Firstly, there is no auctioning example mentioned at the beginning of the chapter. I assume this is in reference to the sample application throughout the book--but since I've not yet been introduced to the auctioning example at this point, I don't really understand why a centralized service isn't appropriate in this type of auction. I'm sure I'll figure it out as I continue to read the book, but at this point I'm left confused and thinking that I missed something. [19] Para 5; The description of the "-d" option to the "join" command does not match the description in "man join". The "join -d group0" command does not work as described in the example on this page. (19) Last but one para; Para starts "n this command.." but should probably be "In this command". {52} The presentation of 'getRemoteAdvertisements' describes the method as having 5 parameters. The code on p. 55, and the documentation on p. 179 both show this method as having a sixth parameter, where the sixth (last) parameter is of type DiscoveryListener. {56} Example Java code, line 13; "restoNetAdv = netpg.getPeerGroupAdvertisement();" should be: "restoNetAdv = restoNet.getPeerGroupAdvertisement();" since we would like to get the advertisement of the newly created group rather than the default net peer group. [61] line 51; the try block which gets the discovery and pipe services for the RestoNet peergroup re-throws an exception, but the joinRestoNet() procedure does not declare Exception to be thrown. The code should read: } catch (Exception e) { System.out.println("Error getting services from RestoNet"); return false; } (89) line 9: 'RestoNet:RestoPipe*' should be 'RestoNet:RestoPipe:*' (2nd colon missing) ?147? The comment beginning at line 30 in the sample code correctly explains that the hash must always be done in the same order, thus the code does not just enumerate through all the elements in the document but must do them in a specific order. However, once it gets each element in the document, it uses an enumeration to go through each document element. The same reasoning should apply here - the parts of each document element must also be obtained and hashed in the same order. It looks as though the code as written works if and only if both of the enumerations created from the 'Price' & 'Brand' elements have a single element. This is confusing; please clarify why this works if it does and/or correct the example if it does not. {276} chpgrp - The example of creating & joining a group here, like the example on p. 19 is wrong/misleading. You cannot from the JXTA shell join a group that has just been created from that shell. Attempts to do so result in an error messaging stating that the group cannot be jointed until the shell is re-started. So, the two commands: - JXTA> join moi - JXTA> join mygroup must be preceeded with 'exit' commands, and re-invocations of the shell. {282/283} The examples for 'join' and 'leave' have the same issue as the one reported for 'chpgrp' on page 276. ?291? set, setenv - The syntax of these commands is shown as: set env to env from setenv env to env from but the uses of / meanings of the args are not explained or discussed, and the only example is of the form set var1 doc What are the other args, and how are they used?