Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Java 11 with glassfish-corba #4

Closed
CSchoel opened this issue Nov 9, 2018 · 8 comments
Closed

Support for Java 11 with glassfish-corba #4

CSchoel opened this issue Nov 9, 2018 · 8 comments

Comments

@CSchoel
Copy link
Member

CSchoel commented Nov 9, 2018

Mo|E currently only works with Java <= 8. In higher Java versions it cannot find the CORBA-classes. In Java 9 and 10 this is probably only a problem with the module system, but in Java 11 the CORBA-api is removed alltogether.

Since I still quite enjoy working with Mo|E, I would suggest that we try to use the glassfish-corba library instead as suggested on stackoverflow.

@njustus , do you think this is possible within a reasonable amount of time?

@njustus
Copy link
Member

njustus commented Nov 11, 2018

I think there are essentially 2 problems:

  1. the lack of java 9, 10 support of MoPE
  2. the deprecated CORBA api from version 11 and upwards

Are you using java 11 already? I don't understand their release cycle anymore 🤔 .
If you are using java 9/10, then I would try to fix the CORBA-issues for this versions first.

Replacing the corba api isn't that easy. For example: i can't find any (java) documentation for the glassfish-corba project 🤷‍♂️ ..
According to OpenModelica's documentation, they do have a ZeroMQ interface.. Maybe we should switch to this, instead of fixing the CORBA stuff.

I don't know how long it would take to switch to ZeroMQ or glassfish-corba either.. I would prefer ZeroMQ, even though it's more additional work.

(OpenModelica/OMPython#23)

If i should implement this, i can't support Dozentron/Gildamesh/Guardian of Times for a few weeks..

@CSchoel
Copy link
Member Author

CSchoel commented Nov 12, 2018

I'm currently on Java 11, but I also have old instances of Java 10, 9 and 8 on my machine. For the time being I can manually start the server with the Java 8 VM.

Oracle now only has long term support (for paying customers) for every third java version. Starting with Java 8, the next LTS version is Java 11. Therefore I think it is more meaningful to fully support Java 11 than to release an intermediate version for java 9/10.

Regarding ZeroMQ: I also stumbled upon this framework somewhere in the OpenModelica forums. I think anything would be better than CORBA and so far I have only heard good things about ZeroMQ.

Long story short: I think our long term goal should be to transition to ZeroMQ with support for Java 11. This is not urgent, but it would be nice to have a first prototype in early january 2019, maybe even late december 2018 if there are no major issues with Dozentron/Gildamesh/GoT.

njustus pushed a commit that referenced this issue Nov 30, 2018
@njustus
Copy link
Member

njustus commented Dec 3, 2018

Here a quick update:
An initial ZeroMQ client is implemented in our omc-java-api. It's also used in a mope-server branch.

Still some things are missing:

  • automatically boot the omc, if not running
  • pre-load the Modelica library, so that it's possible to get completion for it ;)
  • when completing models/classes, the ZMQ connection crashes with not possible in current state ??? Getting completions for (outer) packages is completely working, though.. 🤷 May be the scripting API had a breaking change, since our last updates?!

When this is fixed, i am going to release a new version of our omc-java-api.

FYI: I'm a little sick since saturday. Don't know if i'll fix this issues this week.

@njustus
Copy link
Member

njustus commented Dec 4, 2018

After some playing around and reading through several forums, i think the not possible in current state -erroris a concurrency issue.. When a thread is interrupted after sending a message and before the server reply handling, the request-reply-cycle is corrupted, resulting in the error..

sending and receiving the reply must be made atomic ;).

EDIT:
Yep, I was right. The sending/receiving-pair must not be interrupted 😄 . I've put a lock in front of it.. This is basically what corba internally did.

@njustus
Copy link
Member

njustus commented Dec 5, 2018

Everything went faster than expected.
I've created a prerelease from the server, that can be tested.

  • The library needs to be updated on maven, though..

@CSchoel
Copy link
Member Author

CSchoel commented Dec 5, 2018

Nice! I will test it as soon as possible. 👍

@CSchoel
Copy link
Member Author

CSchoel commented Feb 27, 2019

The server version 0.6.5 starts in Java 11, but I ran into other problems #8 , #9.

@njustus
Copy link
Member

njustus commented Mar 7, 2019

Going to close this one, because java 11 is working.

@njustus njustus closed this as completed Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants