Errata

Just Spring

Errata for Just Spring

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Other Digital Version Download Example Code
Download Example Code

The sample code is confusingly laid out. The top level has two links- an incomplete js-core.zip and a complete js-core folder. You should either add the rest of the code to the zip file or remove it from the site.

Jacob  Oct 17, 2012 
safari
United States

JDBC and Hibernate section:
insert statement for the JDBC/Movie part is missing the stars column and should be:
String sql = "insert into MOVIES (ID, TITLE, STARS, GENRE, SYNOPSIS) values(?,?,?,?,?)";

// The insert parameters
Object[] params = new Object[]{m.getID(), m.getTitle(), m.getStars(), m.getGenre(),
m.getSynopsis()};

// The insert parameters types
int[] types = new int[]{Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR,
Types.VARCHAR};

Aziz Kadhi  Apr 18, 2013 
PDF Page 1
Example 1-1, Second line

The line:

private FileReader fileReader = null;

should be:

private VanillaFileReader fileReader = null;

This is how the sample code is written.

Anonymous  Nov 04, 2014 
PDF Page 62
United States

I recreated the code that runs your Hibernate example in Chapter 5: Spring Data.

on page 62, you are using the Templates load function:

public Movie getMovie(String id) {
return (Movie)getHibernateTemplate().load (Movie.class, id);
}

I found that I had to use getHibernateTemplate().get instead of .load. Using .load throws an exception:
org.hibernate.LazyInitializationException: could not initialize proxy - no Session

Perhaps your code handles setting up the session outside of the parts you put in the books, but .get works using the sample code, plus a bit more.

Patrick Gardella  Oct 26, 2011 
Other Digital Version 507 of 1755
Kindle edition - 3 paragraph about properties

I was unable to run example using the properties file. The book has the properties file like this

file-name="src/main/resources/ex16/ex16-trades-data.txt"

When I created my own application, copying this, I got an error
"src\src\resources\trades-data.txt" (The filename, directory name, or volume label syntax is incorrect)

When I took the quotes .off of the file-name in the properties file,
file-name=src/main/resources/ex16/ex16-trades-data.txt, I was able to run my version OK. I still get an error with the code that I downloaded from the O'Reilly website. I have not figured it out yet. The error is:

he content of element type "beans" must match "(description?,(import|alias|bean)*)".
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)

Charlotte Lopez  Jul 03, 2012