Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Exception in Neighbor Router after upgrade vfrom 1.7.1 to 1.8.0 #1508

Open
tardar opened this issue Jul 10, 2019 · 6 comments
Open

Exception in Neighbor Router after upgrade vfrom 1.7.1 to 1.8.0 #1508

tardar opened this issue Jul 10, 2019 · 6 comments

Comments

@tardar
Copy link

tardar commented Jul 10, 2019

All neighbors after upügrade are shown as "connected: false"
I think that has to do with this error.
With 1.7.1 all worked fine and i only replaced iri.

Bug description

Exception in 1.8.0 after uügrade from 1.7.1

IRI version

1.8.0

Steps To Reproduce

  1. upgrade to 1.8.0 from 1.7.1
  2. start node

Errors

07/10 19:40:58.174 [Neighbor Router] INFO NeighborRouter:336 - established connection to neighbor ***, now performing handshake...
07/10 19:40:58.176 [Neighbor Router] INFO NeighborRouter:262 - neighbor router stopped
Exception in thread "Neighbor Router" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
at com.iota.iri.network.protocol.Handshake.createHandshakePacket(Handshake.java:48)
at com.iota.iri.network.NeighborRouter.handleConnect(NeighborRouter.java:341)
at com.iota.iri.network.NeighborRouter.route(NeighborRouter.java:228)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

@kwek20
Copy link
Contributor

kwek20 commented Jul 11, 2019

What version of java are you on? This is a Java 9 change. A quick fix is to update to 9 as well.

We can make this runnable on 8 by casting before flipping like so: ((Buffer)byteBuffer).flip()

@GalRogozinski
Copy link
Contributor

@kwek20
We only officially support java 8. It definitely works for me on java 8, and we compiled our jar with java 8...

Not sure why this error happens... @tardar did you compile yourself?

@kwek20
Copy link
Contributor

kwek20 commented Jul 11, 2019

@GalRogozinski According to this guy; we couldve still compiled it to a java 9 feature. I didnt test it myself, but lots of people seem to agree: plasma-umass/doppio#497 (comment)

@GalRogozinski
Copy link
Contributor

@kwek20
This means he compiled it himself with java 9...
He should compile it with java 8.

@kwek20
Copy link
Contributor

kwek20 commented Jul 11, 2019

@GalRogozinski Ah i figured maybe you had a higher java, but set compile target as 1.8.
Either way, the fix is easy to implement. I think we should!

@GalRogozinski
Copy link
Contributor

I think we should take some time when we feel like it to go over all the changes we need to do so it works on java 11 (or even 9), and do them. Then we should officially compile on that version.
In the meanwhile people can use java 8.

Otherwise we are fixing one thing for java 9/10/11 and then a commit later we will be breaking another thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants