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

trouble running the server on my laptop #18

Open
michielbdejong opened this issue May 12, 2021 · 16 comments · Fixed by banana-rdf/banana-rdf#365
Open

trouble running the server on my laptop #18

michielbdejong opened this issue May 12, 2021 · 16 comments · Fixed by banana-rdf/banana-rdf#365

Comments

@michielbdejong
Copy link

Hi!

I installed Akka, then copied sbt and dist-sbt into this repo, then ran ./sbt and it all seems to work except:

exception caught when loading module class TurtleWriter$: java.lang.AssertionError: assertion failed: duplicate module class TurtleWriter$#363075; previous was class TurtleWriter$#363069
[error] -- [E008] Not Found Error: /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/src/main/scala/run/cosy/ldp/fs/BasicContainer.scala:100:16 
[error] 100 |	val ldpBC = ldp.BasicContainer.toAkka
[error]     |	            ^^^^^^^^^^^^^^^^^^
[error]     |value BasicContainer is not a member of org.w3.banana.LDPPrefix[run.cosy.RDF.Rdf], but could be made available as an extension method.
[error]     |
[error]     |One of the following imports might make progress towards fixing the problem:
[error]     |
[error]     |  import akka.http.impl.util.JavaMapping.Implicits.convertToScala
[error]     |  import akka.http.javadsl.server.RoutingJavaMapping.Implicits.convertToScala
[error]     |  import scalaz.Leibniz.subst
[error]     |
exception caught when loading module class TriGWriter$: java.lang.AssertionError: assertion failed: duplicate module class TriGWriter$#363386; previous was class TriGWriter$#363380
[error] -- [E008] Not Found Error: /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/src/main/scala/run/cosy/ldp/fs/BasicContainer.scala:172:14 
[error] 172 |		LinkValue(ldp.BasicContainer.toAkka, LinkParams.rel("type")),
[error]     |		          ^^^^^^^^^^^^^^^^^^
[error]     |value BasicContainer is not a member of org.w3.banana.LDPPrefix[run.cosy.RDF.Rdf]
[error] two errors found
[error] two errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 44 s, completed 12 May 2021, 21:55:42
sbt:cosy> 

Any idea what might be causing this?

@michielbdejong
Copy link
Author

The sbt I downloaded was from akka-quickstart-scala btw

@bblfish
Copy link
Member

bblfish commented May 12, 2021

yes, I updated the banana-rdf LDP namespaces, which were pre final spec.
I need to push those minor changes and make a release of banana-rdf too. I'll ping back here as soon as I have done that.

@bblfish
Copy link
Member

bblfish commented May 12, 2021

I published a SNAPSHOT version of banana-rdf with the updates to this and sibling directories.
https://oss.sonatype.org/content/repositories/snapshots/net/bblfish/rdf/banana-rdf_2.13/0.8.5-SNAPSHOT/

I am not 100% sure if my build is setup for picking up those snapshots though. But it should now just work by running sbt from the command line and then trying to compile the project . If that works then run test should start the server with the root being the test directory.

The Akka version of sbt should be ok too. I think I use the one from brew

@bblfish
Copy link
Member

bblfish commented May 12, 2021

Should not be closed quite yet.
This is helping me bump up the priority for adding an automated build process #12

@bblfish bblfish reopened this May 12, 2021
@bblfish
Copy link
Member

bblfish commented May 13, 2021

Travis has now been setup and the build is passing, so the dependencies all seem to be working now.

@bblfish bblfish closed this as completed May 13, 2021
@michielbdejong
Copy link
Author

michielbdejong commented May 13, 2021

I switched to brew install sbt now, but seeing:

$ sbt
[info] welcome to sbt 1.5.2 (N/A Java 15.0.2)
[info] loading project definition from /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/project
/Users/michiel/gh/co-operating-systems/Reactive-SoLiD/build.sbt:1: error: not found: object Dependencies
import Dependencies._
       ^
/Users/michiel/gh/co-operating-systems/Reactive-SoLiD/build.sbt:16: error: not found: value Scala3Libs
		libraryDependencies ++= Scala3Libs.all,
                                        ^
/Users/michiel/gh/co-operating-systems/Reactive-SoLiD/build.sbt:17: error: not found: value JavaLibs
		libraryDependencies ++= JavaLibs.all,
                                        ^
/Users/michiel/gh/co-operating-systems/Reactive-SoLiD/build.sbt:18: error: not found: value Scala213Libs
		libraryDependencies ++= Scala213Libs.allCompatibleLibs,
                                        ^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)

Maybe I should use Java 16 instead of Java 15?

EDIT: Ah never mind, I had accidentally deleted ./project/Dependencies.scala from the rpo

@michielbdejong
Copy link
Author

got a different error now:

$ sbt
[info] welcome to sbt 1.5.0 (N/A Java 15.0.2)
[info] loading settings for project reactive-solid-build from plugins.sbt ...
[info] loading project definition from /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/project
[info] compiling 1 Scala source to /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/project/target/scala-2.12/sbt-1.0/classes ...
[info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.13. Compiling...
[info]   Compilation completed in 11.669s.
[info] loading settings for project root from build.sbt ...
[info] set current project to cosy (in build file:/Users/michiel/gh/co-operating-systems/Reactive-SoLiD/)
[info] sbt server started at local:///Users/michiel/.sbt/1.0/server/2b428c24ec5f659094fa/sock
[info] started sbt server
sbt:cosy> compile
[info] compiling 32 Scala sources to /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/target/scala-3.0.0-RC3/classes ...
exception caught when loading module class TurtleWriter$: java.lang.AssertionError: assertion failed: duplicate module class TurtleWriter$#364755; previous was class TurtleWriter$#364749
[error] -- [E008] Not Found Error: /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/src/main/scala/run/cosy/ldp/fs/BasicContainer.scala:100:16 
[error] 100 |	val ldpBC = ldp.BasicContainer.toAkka
[error]     |	            ^^^^^^^^^^^^^^^^^^
[error]     |value BasicContainer is not a member of org.w3.banana.LDPPrefix[run.cosy.RDF.Rdf], but could be made available as an extension method.
[error]     |
[error]     |One of the following imports might make progress towards fixing the problem:
[error]     |
[error]     |  import akka.http.impl.util.JavaMapping.Implicits.convertToScala
[error]     |  import akka.http.javadsl.server.RoutingJavaMapping.Implicits.convertToScala
[error]     |  import scalaz.Leibniz.subst
[error]     |
exception caught when loading module class TriGWriter$: java.lang.AssertionError: assertion failed: duplicate module class TriGWriter$#365068; previous was class TriGWriter$#365062
[error] -- [E008] Not Found Error: /Users/michiel/gh/co-operating-systems/Reactive-SoLiD/src/main/scala/run/cosy/ldp/fs/BasicContainer.scala:172:14 
[error] 172 |		LinkValue(ldp.BasicContainer.toAkka, LinkParams.rel("type")),
[error]     |		          ^^^^^^^^^^^^^^^^^^
[error]     |value BasicContainer is not a member of org.w3.banana.LDPPrefix[run.cosy.RDF.Rdf]
[error] two errors found
[error] two errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 26 s, completed 13 May 2021, 11:44:03
sbt:cosy> 

@michielbdejong
Copy link
Author

Hm, or maybe that's still exactly the same error, actually

@michielbdejong
Copy link
Author

Tried checking out https://github.com/co-operating-systems/Reactive-SoLiD from scratch, but same result :(

@michielbdejong
Copy link
Author

@michielbdejong
Copy link
Author

Hm, still seeing the same problem after clearing the ivy cache...

@michielbdejong
Copy link
Author

Will try to follow the steps from https://www.travis-ci.com/github/co-operating-systems/Reactive-SoLiD raw log

@michielbdejong
Copy link
Author

Hm, updated openjdk from version 11 to version 16 but that didn't help.
Do you maybe have a Docker image I can use?

@bblfish
Copy link
Member

bblfish commented May 13, 2021

Ok, it looks like you are not getting the uploaded SNAPSHOT of banana-rdf .
I thought that if travis gets it everyone else would too...

That is the problem of working with a SNAPSHOT release I guess....

@bblfish bblfish reopened this May 13, 2021
@bblfish
Copy link
Member

bblfish commented May 13, 2021

The build files is set-up to fetch the banana-rdf SNAPSHOT from the sonatype repo on line 14 which is why it works on Travis.
But it could well be that there is an intermediary cache problem, something that can occur with SNAPSHOTS.

I could make a full release of banana-rdf, and then bump up the number, which should resolve the problem.

@bblfish
Copy link
Member

bblfish commented May 13, 2021

I have released a new - non-SNAPSHOT - version of banana-rdf and have updated the repository here with that update in commit 67ecd477585956f73705560a00cd1cb3b2798d19. The tests pass on Travis too. So now it should work for anyone else on the internet.

It is a bit early to make a Docker image as authorization is not yet implemented, and there is still quite a lot to do.

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

Successfully merging a pull request may close this issue.

2 participants