Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoSuchElementException

 
priya pratheepp
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

while retreving data from SAP i am getting error in log file

92[10]java.util.NoSuchElementException

174[10]java.util.NoSuchElementException

176[10]java.util.NoSuchElementException

217[10]java.util.NoSuchElementException

218[10]java.util.NoSuchElementException

392[10]java.util.NoSuchElementException

408[10]java.util.NoSuchElementException

etc


please help me to trace...any hints please

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before any call to nextToken, you should call hasMoreTokens to make sure that there are indeed more tokens.

Here the call to nextToken happens in a for loop, which -without calls to hasMoreTokens- is a bug waiting to happen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic