Archive for March, 2012

Lets see how to install Java on Ubuntu. On all other Unix flavored systems, the procedure will be more or less same as we’re using terminal Unix commands to install JDK. Download JDK from here: http://www.oracle.com/technetwork/java/archive-139210.html#javase Suppose say JDK is downloaded to ‘Downloads‘ folder Change directory to Downloads folder % cd ~/Downloads Change the execute [...]

Sometimes we will get the NonUniqueResultException when we tried to get the result-set by executing query using Hibernate. The following is the stack trace of the exception: query did not return a unique result: 2 org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.internal.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:899) at org.hibernate.internal.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890) at org.bss.dao.SampleDAO.main(SampleDAO.java:84) This happens because you’re expecting [...]