Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Connect to example standalone server Server.java(Unable to connect to standalone server using example client)
[CDO] Connect to example standalone server Server.java [message #1826741] Wed, 29 April 2020 17:09 Go to next message
Christoph Mack is currently offline Christoph MackFriend
Messages: 4
Registered: November 2019
Junior Member
Hi,

I am trying to connect to the standalone example server org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/Server.java using the example "Eclipse Application Client 1" launch configuration. The server seems to start up normally, but I can't connect the client to it.
When I start the client and then choose to add a new repository via the "CDO Repositories" view, selecting "Connect to an existing remote repository" and entering the host and port, once I enter the repository name (see attached screenshot) I start to see error messages like the following in the server's log:
[ERROR] Buffer@1[READING_HEADER]: New limit -1 is < 0
java.lang.IllegalArgumentException: Buffer@1[READING_HEADER]: New limit -1 is < 0
    at org.eclipse.internal.net4j.buffer.Buffer.startGetting(Buffer.java:245)
    at org.eclipse.net4j.internal.tcp.TCPConnector.handleRead(TCPConnector.java:221)
    at org.eclipse.net4j.internal.tcp.TCPSelector.handleSelection(TCPSelector.java:265)
    at org.eclipse.net4j.internal.tcp.TCPSelector.run(TCPSelector.java:190)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException
    at java.nio.Buffer.limit(Buffer.java:275)
    at org.eclipse.internal.net4j.buffer.Buffer.startGetting(Buffer.java:239)
    ... 4 more

I can still click 'Finish' and add the repository, but after ten seconds I get a popup with a TimeoutRuntimeException: "Channel registration timeout after 10000 milliseconds".

I'd be grateful for any advice on how to get started with a standalone server.

Thanks,

Christoph
Re: [CDO] Connect to example standalone server Server.java [message #1826756 is a reply to message #1826741] Thu, 30 April 2020 05:34 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Just recently I changed the low-level details of the network buffers (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=561532 ). Is it possible that your server and the client use slightly different Net4j versions? What versions do the plugins have on either side?

Re: [CDO] Connect to example standalone server Server.java [message #1826812 is a reply to message #1826756] Fri, 01 May 2020 08:26 Go to previous messageGo to next message
Christoph Mack is currently offline Christoph MackFriend
Messages: 4
Registered: November 2019
Junior Member
Hello Eike,

thank you for your quick response. I think you nailed it. I had used org.eclipse.net4j at version 4.10.0 on the client and 4.9.0 on the server. Using 4.10.0 or 4.9.0 on both client and server the connection works just fine.

Thank you very much
Christoph
Re: [CDO] Connect to example standalone server Server.java [message #1826817 is a reply to message #1826812] Fri, 01 May 2020 09:46 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
I'm glad to hear that it works. The new versions are much more reliable and even perform better.

Previous Topic:EMF + Multiple inheritance with Interfaces
Next Topic:[CDO] Possibility to implement custom (de-)serialization for ObjectType JAVA_OBJECT?
Goto Forum:
  


Current Time: Thu Apr 25 03:44:29 GMT 2024

Powered by FUDForum. Page generated in 0.03319 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top