Compile Error in 1.4 Tech Hub Starter (Scala)
See original GitHub issueResolution : do not use “lagom” as the project name when starting a project from Tech Hub
Lagom : Version 1.4
API : Scala
Operating System : MacOS 10.13.3
JDK : Oracle 1.8.0_152
java version “1.8.0_152” Java™ SE Runtime Environment (build 1.8.0_152-b16) Java HotSpot™ 64-Bit Server VM (build 25.152-b16, mixed mode)
Library Dependencies
standard dependencies for the tech hub starter project
Expected Behavior
- download lagom scala 1.4 starter project
- run permissions adjustments on sbt files per the instructions
- run ‘sbt runAll’, project initializes
- lagom started compiles and runs,
- open browser to http://localhost:9000/api/hello/World and see message
Actual Behavior
- as expected
- as expected
- as expected
- lagom starts up the demo services, but sbt fails to compile the following
- lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:26
- lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:27
- lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:33
- lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:39
- (see below for complete sbt output)
- receive the browser error “Action Not Found For request ‘GET /api/hello/World’ These routes have been tried, in this order: GET \Q/stream\E Service: lagom-stream (http://0.0.0.0:57104)”
sbt output
2012MBP:lagom sailer$ sbt runAll
[info] Loading project definition from /Users/sailer/Downloads/lagom/project
[info] Set current project to lagom (in build file:/Users/sailer/Downloads/lagom/)
[info] Starting Kafka
[info] Starting Cassandra
..........
[info] Cassandra server running at 127.0.0.1:4000
2018-01-29T11:51:49.112Z [info] akka.event.slf4j.Slf4jLogger [] - Slf4jLogger started
2018-01-29T11:51:51.470Z [info] com.lightbend.lagom.discovery.ServiceLocatorServer [] - Service locator can be reached at http://localhost:9008
2018-01-29T11:51:51.470Z [info] com.lightbend.lagom.discovery.ServiceLocatorServer [] - Service gateway can be reached at http://localhost:9000
[info] Service locator is running at http://localhost:9008
[info] Service gateway is running at http://localhost:9000
04:51:53.779 [info] play.core.server.AkkaHttpServer [] - Listening for HTTP on /0:0:0:0:0:0:0:0:57104
04:51:53.946 [info] play.core.server.AkkaHttpServer [] - Listening for HTTP on /0:0:0:0:0:0:0:0:63779
[info] Compiling 3 Scala sources to /Users/sailer/Downloads/lagom/lagom-impl/target/scala-2.12/classes...
04:51:54.819 [info] akka.event.slf4j.Slf4jLogger [] - Slf4jLogger started
04:51:56.073 [info] play.api.Play [] - Application started (Dev)
[error] /Users/sailer/Downloads/lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:26: illegal cyclic reference involving class LagomApplication
[error] abstract class LagomApplication(context: LagomApplicationContext)
[error] ^
[error] /Users/sailer/Downloads/lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:27: no arguments allowed for nullary constructor Object: ()Object
[error] extends LagomApplication(context)
[error] ^
[error] /Users/sailer/Downloads/lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:33: not found: value serverFor
[error] override lazy val lagomServer = serverFor[LagomService](wire[LagomServiceImpl])
[error] ^
[error] /Users/sailer/Downloads/lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:33: recursive lazy value lagomServer needs type
[error] override lazy val lagomServer = serverFor[LagomService](wire[LagomServiceImpl])
[error] ^
[error] /Users/sailer/Downloads/lagom/lagom-impl/src/main/scala/com/example/hello/impl/LagomLoader.scala:39: not found: value persistentEntityRegistry
[error] persistentEntityRegistry.register(wire[LagomEntity])
[error] ^
[error] 5 errors found
[error] (lagom-impl/compile:compileIncremental) Compilation failed
[info] Service lagom-stream-impl listening for HTTP on 0:0:0:0:0:0:0:0:57104
[info] Service lagom-impl listening for HTTP on 0:0:0:0:0:0:0:0:63779
[info] (Services started, press enter to stop and go back to the console...)
Reproducible Test Case
Using the standard starter from Tech Hub reproduces this failure.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SBT 1.4.1 prints Compilation failed in shell, that is ... - GitHub
When I run run sbt compile (note there is no ~ in the command) in a project with a compilation error in sbt...
Read more >Scala SBT compile error - intellij idea - Stack Overflow
First error: Scala 2.9.x requires JVM runtime v 1.6 or 1.7, while you are using 1.8, which wouldn't work as we can clearly...
Read more >eed3si9n
I am Eugene Yokota (@eed3si9n on Twitter and GitHub), a software engineer with years of experience working on Scala tooling. Most recently I...
Read more >Requirements - 2.8.x - Play Framework
A Play application only needs to include the Play JAR files to run properly. These JAR files are published to the Maven Repository,...
Read more >Scala compiler crash (?)
If I run “sbt compile”, the compiler throws up with a bunch of errors such as: [error] (Compile / compileIncremental) java.lang.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think there’s a way to add some validation to this field, so we should disallow values that are known to be broken like this.
@renatocaval ah yes, thanks! I was using “lagom” as the project name from the tech hub page. should have figured it would have caused name collisions 😃