0

We have a legacy project and we are using jgroups-all 2.2.9.1 jar. We are facing a issue from the past few days where our server crashes giving following

      exception :
      java.lang.IllegalArgumentException: timeout value is negative
      at java.lang.Object.wait(Native Method)
      at org.jgroups.protocols.ring.UdpRingNode.receiveToken(UdpRingNode.java:59)
      at org.jgroups.protocols.TOTAL_TOKEN$TokenTransmitter.run(TOTAL_TOKEN.java:1116)

we think this is occuring due to the old jgroups jar we are using.but then if we upgrade the jar file there is another problem.The new jar has removed the sub package ring(org.jgroups.protocol.ring) from package protocol.

So my question is how should we proceed ?. if i will have to change the implementation of udpring then what should i use instead?.

kanhai shah
  • 1,193
  • 10
  • 14

1 Answers1

0

The exception tells the entire story :

java.lang.IllegalArgumentException: timeout value is negative

There must be a call to method that expects a positive value for its argument and you may be giving a negative value to it, so it throws an exception.

Imagine I am having a java.util.Date object, and then I call a method to set the year as

java.util.Date d = new java.util.Date();
d.setYear(-123);

Then it may throw this kind of exception as I cannot specify negative value for year.

So just have check where your code is accessing the jar's code that throws this exception and make a check whether the parameter value passed are of correct value.

Abubakkar
  • 15,488
  • 8
  • 55
  • 83