Better, Faster, Lighter Java by Bruce A. Tate, Justin Gehtland 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 26, 2007. UNCONFIRMED errors and comments from readers: [142] 7.3 7th Paragraph; I am getting the following problem in the code shown class BoardManager { Thwe code starts in paragraph 7 SessionFactory factory; Configuration cfg; BoardManager( ) { try { cfg = new Configuration( ) .addClass(discussion.User.class) // dom4j exception throw .addClass(discussion.Topic.class) .addClass(discussion.Post.class); With Eclipse 3.1 and Hibernate 3.1.1 I am getting following exception All packages and imports have been taken care (I have not explicitely inported do4j.jar) Exception in thread "main" java.lang.NoClassDefFoundError: org/dom4j/DocumentException at discussion.BoardManager.(BoardManager.java:17) at discussion.BoardManager.main(BoardManager.java:131) Interestingly, Hibernate API shows addclass method throws Mapping exception, which inherits from Hibernate Exception. So where is this org/dom4j/DocumentException coming from. {209} last part of code sample; I think this: HashMap hits = new HashMap(qb.getResults().length); for(...........) { hits.put("hits", qb.getResults()[i]); } return new ModelAndView("SearchProducts", hits); should be replaced by something like: HashMap model = new HashMap(1); model.put("hits", Arrays.asList(qb.getResults())); return new ModelAndView("SearchProducts", model);