Just another site

Monthly Archives: May 2014

reset criteria between get rowcount and the execution of the criteria

If we use the same criteria for returning the rowCount and also the data list, we need to reset it after getting rowCount


Long rowCount = (Long) searchCriteria.setProjection(Projections.rowCount()).uniqueResult();
<strong>  searchCriteria.setProjection(null);</strong>



Datasource problem in Jboss

My jboss failed to start. there were some error related to datasource in Jboss log.

Normall you see two datasource file under your jboss deplyment folder:   datasourcename.xml and datasourcename.xml.deployed,

but when I check my jboss deployment folder, I found datasourcename.xml and datasourcename.xml.undeployed.

rename that datasourcename.xml.undeployed file to datasourcename.xml.dodeploy will allow jboss to deploy that datasource file.

Ant build fail to run:Specified VM install not found: type Standard VM, name jdk

Right click on an ANT TASK and select Run as -> External Tools Configuration, change the JRE setting to point to the latest one.