Skip to main content

Posts

Showing posts from October, 2006

java.util.NoSuchElementException

java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) Description from API: The string tokenizer class allows an application to break a string into tokens. The tokenization method is much simpler than the one used by the StreamTokenizer class. The StringTokenizer methods do not distinguish among identifiers, numbers, and quoted strings, nor do they recognize and skip comments. http://java.sun.com/j2se/1.5.0/docs/api/index.html I got this problem while I was trying to deploy the source code at development server.After that I found out that the sql statement only produce 5 value but inside looping it request for 6 values,that's why NOSUCHELEMENT.So make sure that it's match first, what you ask is what you get.And then lastly, I found out that one of programmer forgot to commit her coding!! Solution :Make sure there are matching values. Vector vt = new Vector (); if ( iStudentId != 0 ) { vt = Cocurriculum . getCocuApplyList