Posts Tagged Fix

NonUniqueResultException in Hibernate

March 6, 2012
NonUniqueResultException in Hibernate

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 [...]

Fixing ‘Could not reserve enough space for object heap’ With Ant tool

December 6, 2011
Fixing 'Could not reserve enough space for object heap' With Ant tool

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. This happens only because there is no enough space for ANT build tool to run the scripts. So first fix the heap space. On UNIX: set ANT_OPTS = -Xms16m -Xmx512m On WINDOWS: Add environment [...]

Fixing Invalid command ‘RewriteEngine’

October 21, 2011
Fixing Invalid command 'RewriteEngine'

[Mon Oct 10 21:57:06 2011] [alert] [client 127.0.0.1] C:/wamp/www/web-app/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration This happens only when rewrite module on your Apache server is off. Do the following steps in order to resolve the problem: Go to this folder C:\wamp\bin\apache\Apache2.2.17\conf or corresponding ‘conf‘ [...]

 

If you have a Tip, Comment, Article or anything you want to share, please send it to: i@poisure.com