How I can get the ID of a saved object. please give me an idea. because I am a beginner in grails def saveCandidates(){ def candidate=new Candidates( name: request....

Edit: I am using quartz-2.1.5.jar. Here's the summary of my classes: HttpPollingJob extends PollingJob extends ScheduledJob implements org.quartz.Job Specifically: 1) ScheduledJob implements ...

I have multiple JREs installed (6,7,8 both 32 and 64 bit). The way I have set things up is that I have the set up a number of JAVA_x_HOME paths and then reference JAVA_HOME=%JAVA_x_HOME% depending on ...

I get a lot of IndexOutOfBoundsException from the any Arraylist I use. Most of the times it works fine but sometimes I get this annoying error on Arraylists i use on my project. The main cause is ...

I have a bunch of model objects. These objects end up being rendered as views (say forms) in a rich client app. I started to annotate the fields in the model objects (Java annotations) with things ...

Is this a good idea, to group constants in classes inside Constants class container like public final class Constants { public final class File { public static final int MIN_ROWS = 1; ...

how to parse this date ? Mon Jul 29 02:00:00 CEST 2013 the code: public class HelloWorld{ public static void main(String []args){ try { String startdateString = ...

I have a problem while selecting from a table containg data in utf-8 format in MySQL using java, in the WHERE clause I need to compare if a column value equals to a java String but they don't match ...

I've seen some code in a project recently where some fields in a couple classes have been using the default access modifier without good reason to. It almost looks like a case of "oops, forgot to ...