• Post Reply Bookmark Topic Watch Topic
  • New Topic

StackOverflowError  RSS feed

 
agilemanoj kumar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on SFTP protocol and transferring a simple file from client to server. I am making 20 concurrent client connections to one SFTP server. While doing so, I am getting following error. Anybody has any idea about this error??

 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StackOverflowError is because of too deep recursions.
I am afraid that the stacktrace that you have given us is more related to handling of the exception and not the actual exception stack. The actual stack will tell you which method is recursing deeply and you might be able to solve it then!
 
agilemanoj kumar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution. It was a problem with hashmap. I was using another hashmap as a key for a hashmap to store key-value pair.
For example,
Hashmap hm = new Hashmap();
Hashmap hm2 = new Hashmap();
hm = hm.put(hm2, "value"); // It does not works on some java version. It will throw you StackOverflowError. I didnt dig into more. But I think, this is the cause.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!