Fix some problems on JPA mapping and validate guava use.