We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.

The latest version of the book is P1.0, released almost 5 years ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

Key: Typo Tech. Error Suggestion Not a problem Next edition

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:  

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
1
#42074: The examples do not build out of the box. The root pom.xml along with the hello modules all have various issues, most of which have been repo...more...
Michael Craig Walls says: A few things have changed since the examples were originally produced, such as some dependencies being removing from repositories and Pax Runner not starting the OSGi runtimes with the compendium bundle by default. The technology and tools moved while the printed book and published samples remained static. I will be providing a new zip file with current examples.
P1.0
13-Jan-10
1
#42075: Please update the book to include references to the source for the book. While it does mention it with "Download hello/src/main/..." What? ...more...
Michael Craig Walls says: Addressed in 2nd printing
P1.0
13-Jan-10
24
#42469: The MANIFEST.MF file for the HelloWorld bundle should begin with: Manifest-Version: 1.0 When using Eclipse and exporting the HelloWord c...more...
Michael Craig Walls says: I do not believe that line is strictly required, but...if it makes things easier on Eclipse export, then I'll add it so that there's no confusion. Corrected for 2nd printing.
P1.0
19-Mar-10
32
#40359: To get the hello-service hello-consumer examples working, you have to do the following: In hello-service edit the pom.xml file and change the ...more...
Michael Craig Walls says: The Pax Drone dependencies should have never been there at all. In fact, they don't need to even be Pax Exam dependencies because that particular project never uses Pax Drone or Pax Exam. I've removed those dependencies in the latest example code that will soon be available for download (when I submit errata fixes for a 2nd printing). As for the mvn install steps...that is basic Maven stuff. For the hello-consumer to be able to resolve its dependencies, the hello-service needs to be in the local Maven repo. I've specified a bit more explicit instructions in the text of the 2nd printing.
P1.0
06-Aug-09
34
#40360: The example pom.xml file for hello-consumer is wrong. The correct dependencies section looks like this: <dependencies> <dependency> ...more...
Michael Craig Walls says: At one time the dependency was correct. But then I changed the service bundle's artifact and version. By that time I had the old version in my local Maven repo. So, when I forgot to change it in the consumer pom.xml it still worked because the old stuff was in my local repo. I've corrected this for the next distribution of the example code to go out along with the 2nd printing of the book.
P1.0
06-Aug-09
37
#40236: Examples doesn't work anymore due to inavailability of pax.drone. It seams, the latter has been renamed to pax.exam, but neither by maven nor ...more...
Michael Craig Walls says: I cannot find any references to Pax Drone anywhere in the book. I removed those references in favor of Pax Exam well before the book went to print. I do have some example code laying around that still has Pax Drone dependencies, however. If that code somehow made it into the downloadable examples, then I'll make sure that I remove it before packaging up any new examples for distribution.
P1.0
28-Jul-09
40
#46052: The output examples from Equinox's console are not consistent with having followed the book's examples. The com.pragprog.HelloWorld_1.0.0 is i...more...
P1.0
19-Dec-10
49
#39860: Is the zip'd source code suppose to be fully functional or we need to modify it? Bundles are not configured correctly; i.e Missing imported pa...more...
Michael Craig Walls says: From the output shown here, it looks like the compass bundle wasn't installed. I can't say why exactly, as it installs fine for me. (I do have other issues with the downloaded code due to changes in Pax Runner since the book was published, but I do not have problems with the compass bundle not being loaded.) FWIW, I am working my way through the examples in the book step-by-step, as a reader would, noting all of the steps and output along the way. If I encounter a problem, I note it and document a resolution for it. Any changes necessary will be noted and fixed in a 2nd printing. So far, I've only encountered small issues stemming from a new version of Pax Runner starting the OSGi runtime without the compendium bundle. Aside from that, I've currently got the example working right up through the middle of chapter 5.
P1.0
07-Jul-09
54
#41558: first line says: dwmj% pax-create-bundle -p dwmj.domain -n domain \ -g com.dudewheresmyjar -v 1.0.0-SNAPSHOTs but later on this bundle...more...
Michael Craig Walls says: Corrected for 2nd printing.
P1.0
19-Nov-09
54
#43718: Regarding the osgi.bnd file generated by pax-create-bundle, the book states "For the domain bundle, this file starts out empty." This is incor...more...
Michael Craig Walls says: Addressed for 2nd printing
P1.0
11-Jun-10
55
#39802: In page 55 after we run pax-create-bundle it is suggested to delete the example codes. I do that and continue on with creating the domain cla...more...
Michael Craig Walls says: Good catch...I should have also mentioned that the activator entry should be removed from the osgi.bnd file. Fixed for the 2nd printing.
P1.0
03-Jul-09
55

#39314: For the footnote, Windows users can substitute a caret (^) in place of the Unix backslash to allow continuation of lines.--Tim Kuntz

Michael Craig Walls says: Addressed for 2nd printing.
B1.0
04-Jun-09
55

#43714: JarFile.java is missing import statements. The file contents should be:

package dwmj.domain

import java.util.Set;

public class JarFile {
...

Michael Craig Walls says: Addressed for 2nd printing.
P1.0
11-Jun-10
56
#43715: JarFile.java is missing imports statements (again). Should be: package dwmj.domain; import java.util.Set; import org.compass.annotation...more...
Michael Craig Walls says: Addressed for 2nd printing.
P1.0
11-Jun-10
59
#43716: The book describes how to use compass as a dependency, and then goes on to explain how to use PAX to add a repository. Adding the Compass proj...more...
Michael Craig Walls says: When the chapter was originally written, the Compass dependencies were not in the central repo. Now they are. So, I recommended that this entire bit be removed for the 2nd printing. However, since this is a sizable change, there's no certainty that it will be removed. The best I could do is recommend it.
P1.0
11-Jun-10
61
#40158: pax-create-bundle created this line in osgi.bnd: Bundle-Activator: ${bundle.namespace}.internal.ExampleActivator but it needs to be removed ...more...
Michael Craig Walls says: Addressed for 2nd printing.
P1.0
23-Jul-09
63
#39301: I can't get pax-provision call to work. I'm working behind a proxy and read that equinox won't work... so predictably equinox fails on p. 56. ...more...
Michael Craig Walls says: I'd be interested to know what problems are being encountered here. I know I've run Equinox (via Pax Runner) behind a firewall before. I'm not living behind a corporate firewall these days, so I can't try it out right now. But I did run it several times today while disconnected from the internet altogether and had no troubles. So, I'm at a loss as to how to proceed on this issue. Are there specific errors that you're encountering?
B1.0
02-Jun-09
66
#40369: The instructions for setting up the pax-embed-jar process were confusing, in large part because of the figure at the bottom of page 66. Wha...more...
Michael Craig Walls says: What you see there is an unfortunate artifact from how the book gets generated. The osgi-embedded.bnd file is really just a temporary duplicate of osgi.bnd so that I could have two versions side-by-side for book generation purposes. Don't concern yourself too much with what that means. Suffice it to say that there's no need for the osgi-embedded.bnd file in the real project. The change should only need to be made to osgi.bnd. I've noted that the header for the 1-line listing should be changed to "dwmj/domain/osgi.bnd" and this should be corrected in the 2nd printing.
P1.0
07-Aug-09
78
#47917: I am following the book and everything works until I get to Page 78. I am getting the same error, as on Page 78 - Problem resolving project, w...more...
P1.0
08-Nov-11
83
#41694: I am following dude, where is my jar! example. After importing pax-logging-api and pax-logging-service bundles, I was expecting to see the err...more...
Michael Craig Walls says: An earlier version of Pax Runner started the OSGi runtime along with the OSGi compendium bundle in place. But the newest Pax Runner (which was released *after* the book was printed) does not install the compendium bundle, which the Pax Logging bundles depend upon. To fix the problem, you must simply install the compendium bundle with: pax-import-bundle -g org.osgi -a org.osgi.compendium -v 4.2.0 I've noted this change and will request that it be added to the 2nd printing.
P1.0
03-Dec-09
83
#40955: The pax-import-bundle here doesn't work, and the output in the book shows it too! It says "problem resolving project". I'm getting exactly t...more...
Michael Craig Walls says: The error shown in the book indicates that I had not yet built the wrapped compass bundle (the bundle produced in section 4.2 under "Wrapping JARs"). As long as I build that bundle, as recommended about 1/3 down the page on page 71), then I don't encounter the error. I have been reworking the examples by hand and will be submitting the results and output for a 2nd printing. The error that this issue describes should not have appeared in the printed book, as it represents a basic mistake that could have been avoided had I followed my own directions and built the wrapped compass bundle first. The 2nd printing should show the successful results. I also see that this issue speaks of version 2.2.0 of compass. While that may work, I used version 2.1.0, so your mileage will vary.
P1.0
07-Oct-09
85
#39997: Before importing ops4j pax logging bundles need to add repository $>pax-add-repository -i ops4j.releases -u <link http : // repository.ops4j.o...more...
Michael Craig Walls says: Noted to be addressed for the 2nd printing.
P1.0
15-Jul-09
85
#39799: Hi, I followed the book to build the dudewheresmyjar project and when I reached page 85, I managed to get all modules installed and running bu...more...
Michael Craig Walls says: I'll address the exceptions separately for a different errata item that also describes them. However, the messages you see that show up periodically should cause no concern. They are simply debug messages indicating that Compass is optimizing itself. This is a good thing...not an error.
P1.0
02-Jul-09
85
#40442: I also get the infinite repetition issue with the pax-provision call on page 85. I cannot progress through Chapter 5 until this is explained....more...
Michael Craig Walls says: Notice that these stack traces are being logged at DEBUG level. They aren't a real problem...just an unfortunate way that Compass deals with a classloader gotcha. The gist of it is that Compass tries one approach to do its work, but that approach depends on classloader tricks that won't work in OSGi's locked-down classloading. So, Compass falls back on a different approach. But before it does the fallback, it logs the stack trace, giving the impression that something bad happened. I'll be recommending a change in the 2nd printing to alert the reader to this strange circumstance. In the meantime, it's easy enough to either ignore it or set the logging levels to ignore DEBUG logging from Compass.
P1.0
13-Aug-09
87
#39268: Have same problem described above. Getting NoClassDefFound errors from Compass. I'm haven't used Compass before, but what kind of demands i...more...
Michael Craig Walls says: See my comments on #40442.
B1.0
28-May-09
89

#40647: Having same problem as #39644, I applied advice given at #39997... and "ClassNotFoundException" on CompassConfiguration disappeared.

My 2 cents.--Dany Poupard

Michael Craig Walls says: See my comment for #39997
P1.0
03-Sep-09
90
#40746: When creating the first test class to run with PAX Exam, it would be wise to stress that unlike normal JUnit tests, this one should not be put...more...
Michael Craig Walls says: I am recommending a footnote to be added in the 2nd edition that reads: It's important that IndexServiceBundleTest not be placed in the same package as the IndexService interface itself. Doing so would present a split-package situation where a package appears in multiple bundles--in this case, the index service bundle and the on-the-fly test bundle.
P1.0
15-Sep-09
90

#39269: Sorry, the errata above about NoClassDefFound errors should be for page 90, not 87. --Patrick Paulin

B1.0
28-May-09
90
#39644: Hello, For the index bundle, instead of having NoClassDefFoundError on IndexWriter I get NoClassDefFoundError on org.compass.core.config.Com...more...
Michael Craig Walls says: See comments for #40647 and #39997
P1.0
25-Jun-09
92
#40251: I found that the tests wouldn't pass without making the following correction in IndexServiceBundleTest/configuration(): Was: mavenBundl...more...
P1.0
29-Jul-09
92
#39859: running 'mvn test' from bundle-tests directory fails. I even tried from downloaded source code. Missing: ---------- 1) com.dudewheresmyj...more...
Michael Craig Walls says: A last-minute decision was made to rename the "dude" directory to "dwmj". Apparently it was missed in a few places. I'll be distributing a new zip file with updated examples. I'll also be recommending changes for the 2nd printing to address these concerns.
P1.0
07-Jul-09
94
#39418: Hi, All over the book you can't seem to make up your mind over package name, some places you have it com.dudewheresmyjar.dude where as other...more...
Michael Craig Walls says: I couldn't find any mismatched packages anywhere in the book, with the exception of a few non-central examples. There may, however, have been some of the example code left inconsistent with the last-minute decision to go from "dude" to "dwmj". In any event, I'll be distributing a new set of example code for download as well as recommending some changes for the 2nd printing to address these concerns.
B1.0
11-Jun-09
95

#41563: Section 5.3, 1st paragraph, 4th line: ".. to look search for JAR files .." should either be "to look for" or "to search for"

--Per Holst

Michael Craig Walls says: Fixed for 2nd printing
P1.0
19-Nov-09
99
#40753: The code example for the SpiderActivator class uses an array of MavenSpider instances that is being looped through in the stop() method. This ...more...
Michael Craig Walls says: Addressed for the 2nd printing.
P1.0
16-Sep-09
100
#40754: The "Deploying the Spider Bundle" paragraph speaks of the 'pax-add-dependency' script, yet it should be the 'pax-import-bundle' script, as the...more...
Michael Craig Walls says: Fixed for 2nd printing.
P1.0
16-Sep-09
101
#40763: I had to also add the wrapped compass depdendency to get spider to compile. spider% pax-import-bundle -g com.dudewheresmyjar.dwmj -a org.co...more...
Michael Craig Walls says: I'm not sure why you had to do that, as importing the domain bundle should have pulled the compass bundle in transitively. In fact, I have just run through the examples again (by hand) and had no trouble building the spider bundle, so long as I added the domain and index bundles.
P1.0
17-Sep-09
104
#41890: The actual code for Maven Spider, from a synchronized threading perspective, is potentially broken. public void run() { try { ...more...
Michael Craig Walls says: Fixed as I work through stuff for a 2nd printing. This actual code doesn't appear in the book, but I will make a new download available with this fix in place.
P1.0
22-Dec-09
112
#44580: The Spring version has changed in the maven repository. 1.2.0 is not more accessible. Changing 1.2.0 by 1.2.6 works fine. Maybe this has alre...more...
Michael Craig Walls says: I'm not sure why you had trouble with 1.2.0...I just tried that for myself and it worked fine. 1.2.6 is not even a valid Spring-DM version (1.2.1 is the latest GA version for Spring-DM).
P1.0
12-Aug-10
112
#40012: Need to add repository for spring bundles before importing the bundles. pax-add-repository -i com.springsource.repository.bundles.external ...more...
Michael Craig Walls says: You may be right about this, but I need to dig into it a bit further to be sure that I'm not missing something else. (FWIW, I tried it without doing that and it worked fine, but I need to do more research to be sure).
P1.0
16-Jul-09
112
#39882: As the book enters the portion for Spring DM and its setup it asks to perform a pax-import-bundle from dwmjs. There are no prior references to...more...
Michael Craig Walls says: I had used a separate dwmjs directory for the Spring version of the project. I'm recommending that all occasions of "dwmjs" be changed to "dwmj" for the 2nd printing.
P1.0
08-Jul-09
118
#44581: Both ss and bundle outputs are different. Especially there is no entry under registered service ... No sure it is a technical error. 3 ...more...
Michael Craig Walls says: If you see no published services under the index service bundle, then it's clear that something went wrong. That bundle should publish a service. I can't say for certain what went wrong...but if you "ss" commend lists a different set of bundles, that's probably it. In fact, looking at the list of bundles you have installed, I don't see the Spring-DM bundles...so that'd certainly explain why your service isn't published. Now, the question is...why were the Spring-DM bundles installed for you? I can't say, as I don't know what steps you followed up to this point. But page 112 shows what you need to do to get the Spring-DM bundles installed. I also see that you tried version 1.2.0 and had trouble, so you switched to 1.2.6. I'm not so sure that's the right answer. I just tried it with 1.2.0 and it worked for me. 1.2.6 is not even a valid Spring-DM version number (the latest GA version is 1.2.1).
P1.0
12-Aug-10
166

#41599: Same as #39847 (for PDF) Bundle IDs are referenced as 32 and 33 when they are listed as 35 and 36 respectively.--Per Holst

Michael Craig Walls says: Fixed for 2nd printing.
P1.0
23-Nov-09
168
#39847: Hi, thanks for a well-written book. Just like to highlight that web bundle and UI fragment ids should be 35 and 36 respectively instead of...more...
Michael Craig Walls says: Fixed for 2nd printing
P1.0
07-Jul-09
192

#41601: index-context.xml has the "</beans>" tag in bold--Per Holst

Michael Craig Walls says: Fixed for 2nd printing.
P1.0
23-Nov-09
193

#41602: index-osgi.xml has the "</beans:beans>" tag in bold--Per Holst

Michael Craig Walls says: Fixed for 2nd printing
P1.0
23-Nov-09