MopeSWTP-SS21 / MopeSWTP

MIT License
1 stars 0 forks source link

Problems during Mope-Development Installation. #17

Closed manuEbg closed 3 years ago

manuEbg commented 3 years ago

Connected to https://github.com/MopeSWTP-SS21/MopeSWTP/issues/11 I've been trying to solve the problem during sbt compile of omc-java-api. (Error description in WIKI https://github.com/MopeSWTP-SS21/MopeSWTP/wiki/Development-Environment#mope-dev )

To fix this I updated the following lines

  1. omc-java-api/project/build.properties

sbt.version=1.5.0

  1. omc-java-api/plugins.sbt

    //antlr4 plugin
    addSbtPlugin("com.simplytyped" % "sbt-antlr4" % "0.8.3")
  2. omc-java-api/build.gradle

    ...
    dependencies {
    antlr "org.antlr:antlr4:4.9.2"   //<<=
    compile group: "org.antlr", name: "antlr4-runtime", version: "4.9.2" //<<=
    compile group: "org.slf4j", name: "slf4j-api", version: "1.7.30" //<<=
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' //<<=
    compile 'org.zeromq:jeromq:0.5.2' //<<==
    
    testCompile 'org.testng:testng:6.9.12'
    testCompile group: "ch.qos.logback", name: "logback-classic", version: "1.1.3"
    }
    ...

Now I get the following feedback after sbt compile:

[info] welcome to sbt 1.5.0 (Ubuntu Java 11.0.10)
[info] loading settings for project omc-java-api-build from plugins.sbt ...
[info] loading project definition from /home/swtp/MoPE/omc-java-api/project
[info] set current project to omc-java-api (in build file:/home/swtp/MoPE/omc-java-api/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] compiling 16 Java sources to /home/swtp/MoPE/omc-java-api/target/scala-2.12/classes ...
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:23:1: package org.apache.commons.lang3.tuple does not exist
[error] org.apache.commons.lang3.tuple.ImmutablePair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:24:1: package org.apache.commons.lang3.tuple does not exist
[error] org.apache.commons.lang3.tuple.Pair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:25:1: package org.slf4j does not exist
[error] org.slf4j.Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:26:1: package org.slf4j does not exist
[error] org.slf4j.LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:41:1: cannot find symbol
[error]   symbol:   class Logger
[error]   location: class omc.ImportHandler
[error] Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:44:1: cannot find symbol
[error]   symbol:   class Pair
[error]   location: class omc.ImportHandler
[error] Pair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:29:1: package org.slf4j does not exist
[error] org.slf4j.Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:30:1: package org.slf4j does not exist
[error] org.slf4j.LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:103:1: cannot find symbol
[error]   symbol:   class Pair
[error]   location: class omc.ImportHandler
[error] Pair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:75:1: cannot find symbol
[error]   symbol:   class Logger
[error]   location: class omc.corba.OMCInterface
[error] Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:81:1: cannot find symbol
[error]   symbol:   class Logger
[error]   location: class omc.corba.OMCInterface
[error] Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/version/Version.java:27:1: package org.slf4j does not exist
[error] org.slf4j.Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/version/Version.java:28:1: package org.slf4j does not exist
[error] org.slf4j.LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/version/Version.java:38:1: cannot find symbol
[error]   symbol:   class Logger
[error]   location: class version.Version
[error] Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/OmcExecuter.java:20:1: package org.slf4j does not exist
[error] org.slf4j.Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/OmcExecuter.java:21:1: package org.slf4j does not exist
[error] org.slf4j.LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/OmcExecuter.java:31:1: cannot find symbol
[error]   symbol:   class Logger
[error]   location: class omc.OmcExecuter
[error] Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ZeroMQClient.java:40:1: cannot find symbol
[error]   symbol:   class Socket
[error]   location: class omc.ZeroMQClient
[error] Socket
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ZeroMQClient.java:41:1: cannot find symbol
[error]   symbol:   class Context
[error]   location: class omc.ZeroMQClient
[error] Context
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ZeroMQClient.java:31:1: package org.zeromq does not exist
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ZeroMQClient.java:32:1: package org.zeromq.ZMQ does not exist
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:20:1: package omc.corba.parser does not exist
[error] omc.corba.parser.ListLexer
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:21:1: package omc.corba.parser does not exist
[error] omc.corba.parser.ListParser
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:22:1: package omc.corba.parser.ListParser does not exist
[error] omc.corba.parser.ListParser.ListElementContext
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:23:1: package org.antlr.v4.runtime does not exist
[error] org.antlr.v4.runtime.ANTLRInputStream
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:24:1: package org.antlr.v4.runtime does not exist
[error] org.antlr.v4.runtime.CommonTokenStream
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:130:1: cannot find symbol
[error]   symbol:   class ListElementContext
[error]   location: class omc.corba.ScriptingHelper
[error] ListElementContext
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:157:1: cannot find symbol
[error]   symbol:   class ListElementContext
[error]   location: class omc.corba.ScriptingHelper
[error] ListElementContext
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:41:1: cannot find symbol
[error]   symbol:   variable LoggerFactory
[error]   location: class omc.ImportHandler
[error] LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:88:1: cannot find symbol
[error]   symbol:   class Pair
[error]   location: class omc.ImportHandler
[error] Pair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:90:1: cannot find symbol
[error]   symbol:   class ImmutablePair
[error]   location: class omc.ImportHandler
[error] ImmutablePair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java:92:1: cannot find symbol
[error]   symbol:   class Pair
[error]   location: class omc.ImportHandler
[error] Pair
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:78:1: cannot find symbol
[error]   symbol:   variable LoggerFactory
[error]   location: class omc.corba.OMCInterface
[error] LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:122:1: cannot find symbol
[error]   symbol:   variable Logger
[error]   location: class omc.corba.OMCInterface
[error] Logger
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/OMCInterface.java:122:1: cannot find symbol
[error]   symbol:   variable LoggerFactory
[error]   location: class omc.corba.OMCInterface
[error] LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/version/Version.java:38:1: cannot find symbol
[error]   symbol:   variable LoggerFactory
[error]   location: class version.Version
[error] LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/OmcExecuter.java:37:1: cannot find symbol
[error]   symbol:   variable LoggerFactory
[error]   location: class omc.OmcExecuter
[error] LoggerFactory
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ZeroMQClient.java:102:1: cannot find symbol
[error]   symbol:   variable ZMQ
[error]   location: class omc.ZeroMQClient
[error] ZMQ
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ZeroMQClient.java:103:1: cannot find symbol
[error]   symbol:   variable ZMQ
[error]   location: class omc.ZeroMQClient
[error] ZMQ
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:120:1: cannot find symbol
[error]   symbol:   class ListParser
[error]   location: class omc.corba.ScriptingHelper
[error] ListParser
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:120:1: cannot find symbol
[error]   symbol:   class ListParser
[error]   location: class omc.corba.ScriptingHelper
[error] ListParser
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:120:1: cannot find symbol
[error]   symbol:   class CommonTokenStream
[error]   location: class omc.corba.ScriptingHelper
[error] CommonTokenStream
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:120:1: cannot find symbol
[error]   symbol:   class ListLexer
[error]   location: class omc.corba.ScriptingHelper
[error] ListLexer
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:120:1: cannot find symbol
[error]   symbol:   class ANTLRInputStream
[error]   location: class omc.corba.ScriptingHelper
[error] ANTLRInputStream
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:121:1: package ListParser does not exist
[error] ListParser.ListContext
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:132:1: cannot find symbol
[error]   symbol:   class ListElementContext
[error]   location: class omc.corba.ScriptingHelper
[error] ListElementContext
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:148:1: cannot find symbol
[error]   symbol:   class ListParser
[error]   location: class omc.corba.ScriptingHelper
[error] ListParser
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:148:1: cannot find symbol
[error]   symbol:   class ListParser
[error]   location: class omc.corba.ScriptingHelper
[error] ListParser
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:148:1: cannot find symbol
[error]   symbol:   class CommonTokenStream
[error]   location: class omc.corba.ScriptingHelper
[error] CommonTokenStream
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:148:1: cannot find symbol
[error]   symbol:   class ListLexer
[error]   location: class omc.corba.ScriptingHelper
[error] ListLexer
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:148:1: cannot find symbol
[error]   symbol:   class ANTLRInputStream
[error]   location: class omc.corba.ScriptingHelper
[error] ANTLRInputStream
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:149:1: package ListParser does not exist
[error] ListParser.ListContext
[error] /home/swtp/MoPE/omc-java-api/src/main/java/omc/corba/ScriptingHelper.java:159:1: cannot find symbol
[error]   symbol:   class ListElementContext
[error]   location: class omc.corba.ScriptingHelper
[error] ListElementContext
[info] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java: ImportHandler.java uses unchecked or unsafe operations.
[info] /home/swtp/MoPE/omc-java-api/src/main/java/omc/ImportHandler.java: Recompile with -Xlint:unchecked for details.
[error] (Compile / compileIncremental) javac returned non-zero exit code
[error] Total time: 9 s, completed Apr 26, 2021, 4:06:53 PM

Im not quite sure, but to me it looks like the Dependencies are still missing. However, when I run gradle build i get the following output:

> Task :test 

Gradle suite > Gradle test > omc.ImportHandlerTest STANDARD_OUT
    16:41:24.049 [Test worker] INFO  omc.OmcExecuter - started [omc, --interactive=zmq, -z=om_local] locale en_US.UTF-8 - output redirecting to: /tmp/omc_home-1fcb8d93-bb5e-4d44-880b-af13fd80a303/omc.log
    16:41:27.241 [Test worker] DEBUG omc.corba.OMCInterface - reading port file at: /tmp/openmodelica.swtp.port.om_local
    16:41:27.247 [Test worker] DEBUG omc.corba.OMCInterface - port file content: tcp://127.0.0.1:41519
    16:41:27.322 [Test worker] DEBUG omc.corba.OMCInterface - connecting to socket: true
    16:41:41.084 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadModel(Modelica) returned true
    16:41:41.091 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:41:41.094 [Test worker] DEBUG omc.corba.OMCInterface - calling loadModel(Modelica) returned: true

Gradle suite > Gradle test > omc.ImportHandlerTest.testLoadLibrary STANDARD_OUT
    16:41:41.119 [Test worker] INFO  omc.ImportHandler - Using file: /tmp/ext-libs11661510376558848414/package.imports

Gradle suite > Gradle test > omc.ImportHandlerTest.testLoadLibrary FAILED
    java.io.FileNotFoundException: The library /Users/nico/2014-modelica-kotani/SHM does not exist
        at omc.ImportHandler.loadLibrary(ImportHandler.java:82)
        at omc.ImportHandlerTest.testLoadLibrary(ImportHandlerTest.java:86)

Gradle suite > Gradle test > omc.ImportHandlerTest.testLoadLibraryFail STANDARD_OUT
    16:41:41.147 [Test worker] INFO  omc.ImportHandler - Using file: /tmp/ext-libs11661510376558848414/package.imports
    16:41:42.563 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadFile("/tmp/ext-libs11661510376558848414") returned false
    16:41:42.564 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:41:42.565 [Test worker] DEBUG omc.corba.OMCInterface - calling loadFile("/tmp/ext-libs11661510376558848414") returned: false
    16:41:42.565 [Test worker] DEBUG omc.ImportHandler - Loading /tmp/ext-libs11661510376558848414 returned Result [result=false, error=Optional.empty]

Gradle suite > Gradle test > omc.ImportHandlerTest.testLoadLibraryFail FAILED
    java.lang.AssertionError: expected [true] but found [false]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:513)
        at org.testng.Assert.assertEqualsImpl(Assert.java:135)
        at org.testng.Assert.assertEquals(Assert.java:116)
        at org.testng.Assert.assertEquals(Assert.java:305)
        at org.testng.Assert.assertEquals(Assert.java:315)
        at omc.ImportHandlerTest.testLoadLibraryFail(ImportHandlerTest.java:92)

Gradle suite > Gradle test > omc.ImportHandlerTest.testRelativeImports STANDARD_OUT
    16:41:42.589 [Test worker] INFO  omc.ImportHandler - Using file: /tmp/ext-libs11661510376558848414/package.imports

Gradle suite > Gradle test > omc.ImportHandlerTest.testValidConstructor STANDARD_OUT
    16:41:42.591 [Test worker] INFO  omc.ImportHandler - Using file: /tmp/ext-libs11661510376558848414/package.imports
    16:41:42.592 [Test worker] INFO  omc.ImportHandler - Using file: /tmp/ext-libs11661510376558848414/package.imports

Gradle suite > Gradle test > version.JMVersionTest.compareVersion STANDARD_OUT
    16:41:42.657 [Test worker] DEBUG version.Version - raw: r33452 - major: Optional[33452] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:42.658 [Test worker] DEBUG version.Version - raw: r33456 - major: Optional[33456] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:42.731 [Test worker] DEBUG version.Version - raw: r33456 - major: Optional[33456] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:42.752 [Test worker] DEBUG version.Version - raw: r33444 - major: Optional[33444] minor: Optional.empty patch: Optional.empty isDev: false

Gradle suite > Gradle test > version.JMVersionTest.jmVersion STANDARD_OUT
    16:41:42.829 [Test worker] DEBUG version.Version - raw: r33456 - major: Optional[33456] minor: Optional.empty patch: Optional.empty isDev: false

Gradle suite > Gradle test > version.OMVersionTest.compareTest STANDARD_OUT
    16:41:42.945 [Test worker] DEBUG version.Version - raw: OpenModelica 25 - major: Optional[25] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:42.962 [Test worker] DEBUG version.Version - raw: OpenModelica 25 - major: Optional[25] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:42.973 [Test worker] DEBUG version.Version - raw: OpenModelica 34 - major: Optional[34] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:42.985 [Test worker] DEBUG version.Version - raw: OpenModelica 25 - major: Optional[25] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:43.000 [Test worker] DEBUG version.Version - raw: OpenModelica 10 - major: Optional[10] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:43.006 [Test worker] DEBUG version.Version - raw: OpenModelica 25 - major: Optional[25] minor: Optional.empty patch: Optional.empty isDev: false
    16:41:43.009 [Test worker] DEBUG version.Version - raw: OpenModelica 10.1 - major: Optional[10] minor: Optional[1] patch: Optional.empty isDev: false
    16:41:43.012 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2 - major: Optional[10] minor: Optional[2] patch: Optional.empty isDev: false
    16:41:43.015 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2 - major: Optional[10] minor: Optional[2] patch: Optional.empty isDev: false
    16:41:43.044 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2 - major: Optional[10] minor: Optional[2] patch: Optional.empty isDev: false
    16:41:43.058 [Test worker] DEBUG version.Version - raw: OpenModelica 10.3 - major: Optional[10] minor: Optional[3] patch: Optional.empty isDev: false
    16:41:43.094 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2 - major: Optional[10] minor: Optional[2] patch: Optional.empty isDev: false
    16:41:43.105 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.4 - major: Optional[10] minor: Optional[2] patch: Optional[4] isDev: false
    16:41:43.114 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.3 - major: Optional[10] minor: Optional[2] patch: Optional[3] isDev: false
    16:41:43.125 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.3 - major: Optional[10] minor: Optional[2] patch: Optional[3] isDev: false
    16:41:43.150 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.3 - major: Optional[10] minor: Optional[2] patch: Optional[3] isDev: false
    16:41:43.187 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.1 - major: Optional[10] minor: Optional[2] patch: Optional[1] isDev: false
    16:41:43.188 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.3 - major: Optional[10] minor: Optional[2] patch: Optional[3] isDev: false

Gradle suite > Gradle test > version.OMVersionTest.compareToMajor STANDARD_OUT
    16:41:43.240 [Test worker] DEBUG version.Version - raw: OpenModelica 25.3.1 - major: Optional[25] minor: Optional[3] patch: Optional[1] isDev: false
    16:41:43.244 [Test worker] DEBUG version.Version - raw: OpenModelica 23.5.1 - major: Optional[23] minor: Optional[5] patch: Optional[1] isDev: false

Gradle suite > Gradle test > version.OMVersionTest.compareToMinor STANDARD_OUT
    16:41:43.251 [Test worker] DEBUG version.Version - raw: OpenModelica 23.3.1 - major: Optional[23] minor: Optional[3] patch: Optional[1] isDev: false
    16:41:43.255 [Test worker] DEBUG version.Version - raw: OpenModelica 23.5.1 - major: Optional[23] minor: Optional[5] patch: Optional[1] isDev: false

Gradle suite > Gradle test > version.OMVersionTest.compareToPatch STANDARD_OUT
    16:41:43.258 [Test worker] DEBUG version.Version - raw: OpenModelica 25.3.4 - major: Optional[25] minor: Optional[3] patch: Optional[4] isDev: false
    16:41:43.262 [Test worker] DEBUG version.Version - raw: OpenModelica 25.3.4 - major: Optional[25] minor: Optional[3] patch: Optional[4] isDev: false
    16:41:43.273 [Test worker] DEBUG version.Version - raw: OpenModelica 25.3.5 - major: Optional[25] minor: Optional[3] patch: Optional[5] isDev: false
    16:41:43.284 [Test worker] DEBUG version.Version - raw: OpenModelica 25.3.4 - major: Optional[25] minor: Optional[3] patch: Optional[4] isDev: false

Gradle suite > Gradle test > version.OMVersionTest.isDev STANDARD_OUT
    16:41:43.308 [Test worker] DEBUG version.Version - raw: OpenModelica    23.3~dev - major: Optional[23] minor: Optional[3] patch: Optional.empty isDev: true
    16:41:43.322 [Test worker] DEBUG version.Version - raw: OpenModelica    23.3 - major: Optional[23] minor: Optional[3] patch: Optional.empty isDev: false

Gradle suite > Gradle test > version.OMVersionTest.isDevTest STANDARD_OUT
    16:41:43.335 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.4   dev - major: Optional[10] minor: Optional[2] patch: Optional[4] isDev: true
    16:41:43.342 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.4~dev - major: Optional[10] minor: Optional[2] patch: Optional[4] isDev: true
    16:41:43.347 [Test worker] DEBUG version.Version - raw: OpenModelica 10.2.4 - major: Optional[10] minor: Optional[2] patch: Optional[4] isDev: false

Gradle suite > Gradle test > version.OMVersionTest.parseFull STANDARD_OUT
    16:41:43.392 [Test worker] DEBUG version.Version - raw: OpenModelica 1.11.23 - major: Optional[1] minor: Optional[11] patch: Optional[23] isDev: false

Gradle suite > Gradle test > version.OMVersionTest.parseMajor STANDARD_OUT
    16:41:43.468 [Test worker] DEBUG version.Version - raw: OpenModelica    23 - major: Optional[23] minor: Optional.empty patch: Optional.empty isDev: false

Gradle suite > Gradle test > version.OMVersionTest.parseMinor STANDARD_OUT
    16:41:43.490 [Test worker] DEBUG version.Version - raw: OpenModelica 1.234 - major: Optional[1] minor: Optional[234] patch: Optional.empty isDev: false

Gradle suite > Gradle test > omc.corba.ScriptingHelperTest.fromNestedArrayTest STANDARD_OUT
    (nico, model, jenny, derb)

Gradle suite > Gradle test > omc.corba.ScriptingHelperTest.fromNestedArrayTest STANDARD_ERROR
    line 1:0 mismatched input '(nico, model, jenny, derb)' expecting {'(', '{'}

Gradle suite > Gradle test > omc.corba.ScriptingHelperTest.fromNestedArrayTest FAILED
    java.lang.AssertionError: lists don't have the same size expected [4] but found [0]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:513)
        at org.testng.Assert.assertEqualsImpl(Assert.java:135)
        at org.testng.Assert.assertEquals(Assert.java:116)
        at org.testng.Assert.assertEquals(Assert.java:389)
        at org.testng.Assert.assertEquals(Assert.java:556)
        at org.testng.Assert.assertEquals(Assert.java:533)
        at omc.corba.ScriptingHelperTest.fromNestedArrayTest(ScriptingHelperTest.java:144)

Gradle suite > Gradle test > omc.corba.ScriptingHelperTest.killTrailingQuotesTest FAILED
    java.lang.AssertionError: expected [eclipse is not pink! /tmp:4] but found [
    eclipse is not pink! /tmp:4  ]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:513)
        at org.testng.Assert.assertEqualsImpl(Assert.java:135)
        at org.testng.Assert.assertEquals(Assert.java:116)
        at org.testng.Assert.assertEquals(Assert.java:190)
        at org.testng.Assert.assertEquals(Assert.java:200)
        at omc.corba.ScriptingHelperTest.killTrailingQuotesTest(ScriptingHelperTest.java:83)

Gradle suite > Gradle test > version.SemanticVersionTest.parseFullVersion STANDARD_OUT
    16:41:44.727 [Test worker] DEBUG version.Version - raw: V 1.2.3 - major: Optional[1] minor: Optional[2] patch: Optional[3] isDev: false
    16:41:44.728 [Test worker] DEBUG version.Version - raw: v 1.2.3 - major: Optional[1] minor: Optional[2] patch: Optional[3] isDev: false
    16:41:44.732 [Test worker] DEBUG version.Version - raw: 1.2.3 - major: Optional[1] minor: Optional[2] patch: Optional[3] isDev: false

Gradle suite > Gradle test > version.SemanticVersionTest.parseMajor STANDARD_OUT
    16:41:44.744 [Test worker] DEBUG version.Version - raw: V 1 - major: Optional[1] minor: Optional.empty patch: Optional.empty isDev: false

Gradle suite > Gradle test > version.SemanticVersionTest.parseMinor STANDARD_OUT
    16:41:44.746 [Test worker] DEBUG version.Version - raw: V 1.2 - major: Optional[1] minor: Optional[2] patch: Optional.empty isDev: false

Gradle suite > Gradle test > omc.ZMQClientTest.connectTest STANDARD_OUT
    16:41:44.788 [Test worker] INFO  omc.OmcExecuter - started [omc, --interactive=zmq, -z=om_local] locale en_US.UTF-8 - output redirecting to: /tmp/omc_home-c3bf7a4f-0a98-4607-862b-ba64bf366ad0/omc.log
    16:41:47.808 [Test worker] DEBUG omc.corba.OMCInterface - reading port file at: /tmp/openmodelica.swtp.port.om_local
    16:41:47.812 [Test worker] DEBUG omc.corba.OMCInterface - port file content: tcp://127.0.0.1:40075
    16:41:47.832 [Test worker] DEBUG omc.corba.OMCInterface - connecting to socket: true
    16:42:00.742 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadModel(Modelica) returned true
    16:42:00.750 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:42:00.750 [Test worker] DEBUG omc.corba.OMCInterface - calling loadModel(Modelica) returned: true

Gradle suite > Gradle test > omc.ZMQClientTest.simpleExpressionTest STANDARD_OUT
    16:42:00.760 [Test worker] INFO  omc.OmcExecuter - started [omc, --interactive=zmq, -z=om_local] locale en_US.UTF-8 - output redirecting to: /tmp/omc_home-692d338b-40aa-4f60-8e43-dbaa31685035/omc.log
    16:42:03.771 [Test worker] DEBUG omc.corba.OMCInterface - reading port file at: /tmp/openmodelica.swtp.port.om_local
    16:42:03.774 [Test worker] DEBUG omc.corba.OMCInterface - port file content: tcp://127.0.0.1:36771
    16:42:03.780 [Test worker] DEBUG omc.corba.OMCInterface - connecting to socket: true
    16:42:17.964 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadModel(Modelica) returned true
    16:42:17.967 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:42:17.967 [Test worker] DEBUG omc.corba.OMCInterface - calling loadModel(Modelica) returned: true
    16:42:17.969 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: model test end test; returned {test}
    16:42:17.974 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:42:17.975 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: model test ed test; returned Error occurred building AST
    Syntax Error
    [<interactive>:1:0-1:0:writable] Error: No viable alternative near token: <EOF>
    16:42:17.977 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""

Gradle suite > Gradle test > omc.ZMQClientTest.testCall STANDARD_OUT
    16:42:17.992 [Test worker] INFO  omc.OmcExecuter - started [omc, --interactive=zmq, -z=om_local] locale en_US.UTF-8 - output redirecting to: /tmp/omc_home-aa5c443c-318a-459c-8cf5-45ee90136941/omc.log
    16:42:21.000 [Test worker] DEBUG omc.corba.OMCInterface - reading port file at: /tmp/openmodelica.swtp.port.om_local
    16:42:21.003 [Test worker] DEBUG omc.corba.OMCInterface - port file content: tcp://127.0.0.1:46177
    16:42:21.003 [Test worker] DEBUG omc.corba.OMCInterface - connecting to socket: true
    16:42:37.043 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadModel(Modelica) returned true
    16:42:37.046 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:42:37.046 [Test worker] DEBUG omc.corba.OMCInterface - calling loadModel(Modelica) returned: true
    16:42:37.622 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadFile("testi") returned false
    16:42:37.640 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:42:37.640 [Test worker] DEBUG omc.corba.OMCInterface - calling loadFile("testi") returned: false

Gradle suite > Gradle test > omc.ZMQClientTest.testErrors STANDARD_OUT
    16:42:37.729 [Test worker] INFO  omc.OmcExecuter - started [omc, --interactive=zmq, -z=om_local] locale en_US.UTF-8 - output redirecting to: /tmp/omc_home-0ba74c0c-af24-4315-a3a3-fd5cd269a83e/omc.log
    16:42:40.732 [Test worker] DEBUG omc.corba.OMCInterface - reading port file at: /tmp/openmodelica.swtp.port.om_local
    16:42:40.736 [Test worker] DEBUG omc.corba.OMCInterface - port file content: tcp://127.0.0.1:39155
    16:42:40.737 [Test worker] DEBUG omc.corba.OMCInterface - connecting to socket: true
    16:42:58.081 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadModel(Modelica) returned true
    16:42:58.088 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:42:58.088 [Test worker] DEBUG omc.corba.OMCInterface - calling loadModel(Modelica) returned: true
    16:42:58.446 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadFle("testbla") returned 
    16:42:58.448 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: "[<interactive>:1:1-1:0:writable] Error: Class loadFle not found in scope <global scope> (looking for a function or record).
    "
    16:42:58.450 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: model tst end tst2; returned Error occurred building AST
    Syntax Error
    [<interactive>:1:6-1:17:writable] Error: Parse error: The identifier at start and end are different
    16:42:58.464 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""

Gradle suite > Gradle test > omc.ZMQClientTest.testExpressions STANDARD_OUT
    16:42:58.482 [Test worker] INFO  omc.OmcExecuter - started [omc, --interactive=zmq, -z=om_local] locale en_US.UTF-8 - output redirecting to: /tmp/omc_home-d507b8a3-9e4c-4021-9551-7fa4340c54fd/omc.log
    16:43:01.525 [Test worker] DEBUG omc.corba.OMCInterface - reading port file at: /tmp/openmodelica.swtp.port.om_local
    16:43:01.528 [Test worker] DEBUG omc.corba.OMCInterface - port file content: tcp://127.0.0.1:36777
    16:43:01.540 [Test worker] DEBUG omc.corba.OMCInterface - connecting to socket: true
    16:43:17.226 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: loadModel(Modelica) returned true
    16:43:17.255 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:43:17.256 [Test worker] DEBUG omc.corba.OMCInterface - calling loadModel(Modelica) returned: true
    16:43:17.267 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: model test Real x = 0.0; end test; returned {test}
    16:43:17.269 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""
    16:43:19.963 [Test worker] DEBUG omc.corba.OMCInterface - sendExpression: checkModel(test) returned "Check of test completed successfully.
    Class test has 1 equation(s) and 1 variable(s).
    1 of these are trivial equation(s)."
    16:43:19.972 [Test worker] DEBUG omc.corba.OMCInterface - receiving errors returned: ""

46 tests completed, 4 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/swtp/MoPE/omc-java-api/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 17s
9 actionable tasks: 5 executed, 4 up-to-date

So i read 46 test completed, and i think you can only run the tests if you have the dependencies?

Any Ideas on how to move forward?

CSchoel commented 3 years ago

I did not have time yet to read the full error message, but I believe this could be related to JEP 320, i.e. the removal of the CORBA support from the Java standard library. https://openjdk.java.net/jeps/320 (Link is currently broken for me, don't know why)

Previous versions of the OMC used a CORBA interface that is now still optionally available. It seems that Mo|E also still optionally supports this old interface. The support for CORBA can be dropped, so you may be able to get Mo|E to compile if you deactivate the CORBA-related code.

CSchoel commented 3 years ago

Hm... can't be just that. There is more. Seems that all dependencies are failing? :raised_eyebrow:

CSchoel commented 3 years ago

I tried to reproduce the issue on my machine, but failed. The following steps worked perfectly fine for me:

  1. mkdir MoPE
  2. cd MoPE
  3. git clone https://github.com/THM-MoTE/mope-server.git
  4. git clone https://github.com/THM-MoTE/EnhancedWatchService.git
  5. git clone https://github.com/THM-MoTE/recently.git
  6. git clone https://github.com/THM-MoTE/omc-java-api.git
  7. cd mope-server
  8. sbt
  9. sbt:MoPE-server> compile

sbt --version:

[info] 1.2.8
sbt script version: 1.4.7

java -version:

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9)
OpenJDK 64-Bit Server VM (build 11.0.10+9, mixed mode)

The OS is Manjaro Linux.

CSchoel commented 3 years ago

ARGH, I see now what is happening. :facepalm:

I was thinking you want to install mope-server using sbt, but as you said in the issue description, you actually wanted to compile omc-java-api. The thing is that this project does not have a build.sbt file, so I do not think it should be built using sbt, but rather with gradle, as you did in your second attempt. So back to the start to find the gradle issue...

CSchoel commented 3 years ago

OK, the gradle build actually runs perfectly fine, as you can see when you just run gradle compileJava:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 536ms
2 actionable tasks: 2 up-to-date`

There are only errors in the javadoc task (creating HTML version of documentation) and the test task (running unit tests). The test errors can be traced to these lines:

  1. Linking to files outside the repository dependencies is bad, mkay
  2. Should throw exception, but doesn't, probably error in the test code
  3. Error in a quote removing function (either call trim() again in function, or add spaces to expected output)

None of these errors are critical for the function of the Mo|E server, however, which is why the compilation of the whole server and the server application itself are working fine.

manuEbg commented 3 years ago

So your gradle build worked without updateing dependencies?

The Absence of build.sbt has also made me a bit uneasy... however the DevSetup for Mope-Server( https://github.com/THM-MoTE/mope-server#developer-setup ) explicitly states sbt compile .

manuEbg commented 3 years ago

The gradle build also works with the original dependencies. The api seems to work fine as far as we can tell

Closeing the issue for now assuming that Gradle is the way to go