posted 10 years ago
Hello everyone!
I have a database table with sport matches. In my application users can choose which matches they want to follow by clicking on add in a data-tables table. I fetch matches from database with this method:
With that method I achieve that only new matches are shown to the user. Finished matches remain in database. For example, if there are 10 matches. 4 are finished. Number of matches is still 10 but I fetch in my list only 6. When user wants to add a match with ID >=6, application crashes and the java.lang.IndexOutOfBoundsException appears. If I remove the WHERE part of query, then I don't receive this exception.
Here is my code:
Controller index.java
How could I solve this exception?
Thanks.
Jozo