akka / akka-quickstart-java.g8 Goto Github PK
View Code? Open in Web Editor NEWA minimal seed template for an Akka in Java
Home Page: https://developer.lightbend.com/guides/akka-quickstart-java/index.html
A minimal seed template for an Akka in Java
Home Page: https://developer.lightbend.com/guides/akka-quickstart-java/index.html
Following the instructions on this page:
https://developer.lightbend.com/guides/akka-quickstart-java/
Output of gradle run
is:
FAILURE: Build failed with an exception.
* Where:
Build file '/mnt/c/Habib/hello-akka/build.gradle' line: 12
* What went wrong:
A problem occurred evaluating root project 'hello-akka'.
> Could not find method compile() for arguments [com.typesafe.akka:akka-actor-typed_2.13:2.6.14] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* 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 9s
Using Gradle 7.0 and Java 11.
Room for improvement:
idea
plugin, and more?)Edit: Found that it does work on Gradle 6.9. So I have a feeling Akka doesn't work at all on Gradle 7?
Per this marketing effort: https://docs.google.com/spreadsheets/d/1IJCclFJYD7SuxdIgYJ9wyHu-rDn-z5Rt-BKWgDOGfz0/edit?usp=sharing Project Starter is going to be removed from Techhub. Instead, the guide should point directly to the download:
https://example.lightbend.com/v1/download/akka-quickstart-java?name=akka-quickstart-java
Use a giter8 maven property perhaps?
The build.gradle
file in this project uses mavenLocal
:
repositories {
mavenLocal()
}
This means that the command gradle run
will fail if you haven't already downloaded the necessary akka jars into your .m2 cache. The build.gradle
file should use mavenCentral()
instead.
Sorry, I'm not sure where to file this bug. This page: http://developer.lightbend.com/guides/akka-quickstart-java/communicate-with-actors.html says
use the ! (bang) method on the ActorRef
But that's how things are done in Scala, not Java.
And make sure to check if all docs are using the new name
Hi all,
Just wanted to submit a few doc issues based on the Quickstart guide.
In the console output for Gradle on that page, the type of the Bot should be GreeterBot
and not HelloWorldBot
.
Also on the same page, in the What Hello World does section, the first bullet point should be Greeter
and not Greet
.
Hope this helps.
Java users shouldn't need to first select a Scala version, we can hard code that.
I am running this on a windows 7 machine. What am I doing wrong?
{ t } » which sbt /d/temp/t
/cygdrive/c/Program Files (x86)/sbt/bin/sbt
{ t } » java -version /d/temp/t
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
{ t } » sbt new akka/akka-java-seed.g8 /d/temp/t
[info] Set current project to t (in build file:/D:/temp/t/)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exiting due to error in the template
File: D:\dev\apps\.babun\cygwin\tmp\giter8-6791571998485\src\main\g8\project\Dependencies.scala, context [anonymous] 4:27 internal error: org.stringtemplate.v4.compiler.STException: context [anonymous] 4:27 attribute akka_version isn't defined
at giter8.G8$STErrorHandler.runTimeError(g8.scala:110)
at giter8.G8$STErrorHandler.runTimeError(g8.scala:105)
at org.stringtemplate.v4.misc.ErrorManager.runTimeError(ErrorManager.java:133)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:193)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:145)
at org.stringtemplate.v4.ST.write(ST.java:427)
at org.stringtemplate.v4.ST.render(ST.java:497)
at org.clapper.scalasti.ST.render(ST.scala:286)
at giter8.G8$.applyTemplate(g8.scala:102)
at giter8.G8$.write(g8.scala:154)
at giter8.G8$.write(g8.scala:138)
at giter8.G8$$anonfun$writeTemplates$2$$anonfun$apply$11.apply(g8.scala:396)
at giter8.G8$$anonfun$writeTemplates$2$$anonfun$apply$11.apply(g8.scala:396)
at scala.util.control.Exception$Catch$$anonfun$opt$1.apply(Exception.scala:118)
at scala.util.control.Exception$Catch$$anonfun$opt$1.apply(Exception.scala:118)
at scala.util.control.Exception$Catch.apply(Exception.scala:102)
at scala.util.control.Exception$Catch.opt(Exception.scala:118)
at giter8.G8$$anonfun$writeTemplates$2.apply(g8.scala:395)
at giter8.G8$$anonfun$writeTemplates$2.apply(g8.scala:386)
at scala.collection.immutable.Stream.foreach(Stream.scala:547)
at giter8.G8$.writeTemplates(g8.scala:386)
at giter8.G8$$anonfun$applyT$1.apply(g8.scala:256)
at giter8.G8$$anonfun$applyT$1.apply(g8.scala:249)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at giter8.G8$.applyT(g8.scala:249)
at giter8.G8$.fromDirectory(g8.scala:62)
at giter8.JgitHelper$$anonfun$run$2.apply(JgitHelper.scala:67)
at giter8.JgitHelper$$anonfun$run$2.apply(JgitHelper.scala:66)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at giter8.JgitHelper$.run(JgitHelper.scala:66)
at giter8.JgitHelper$.run(JgitHelper.scala:78)
at giter8.Giter8$$anonfun$2.apply(giter8.scala:34)
at giter8.Giter8$$anonfun$2.apply(giter8.scala:33)
at scala.Option.map(Option.scala:145)
at giter8.Giter8.run(giter8.scala:33)
at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:68)
at sbt.TemplateCommandUtil$.sbt$TemplateCommandUtil$$runTemplate(TemplateCommand.scala:59)
at sbt.TemplateCommandUtil$$anonfun$2.apply(TemplateCommand.scala:45)
at sbt.TemplateCommandUtil$$anonfun$2.apply(TemplateCommand.scala:41)
at scala.collection.LinearSeqOptimized$class.find(LinearSeqOptimized.scala:100)
at scala.collection.immutable.List.find(List.scala:84)
at sbt.TemplateCommandUtil$.sbt$TemplateCommandUtil$$run(TemplateCommand.scala:41)
at sbt.TemplateCommandUtil$$anonfun$templateCommandParser$1.apply(TemplateCommand.scala:34)
at sbt.TemplateCommandUtil$$anonfun$templateCommandParser$1.apply(TemplateCommand.scala:28)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
at sbt.Command$.process(Command.scala:93)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:96)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:96)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:96)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:96)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:96)
at sbt.MainLoop$.run(MainLoop.scala:89)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:68)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:63)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:63)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:46)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:30)
at sbt.MainLoop$.runLogged(MainLoop.scala:22)
at sbt.StandardMain$.runManaged(Main.scala:57)
at sbt.xMain.run(Main.scala:29)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
Printer.java has this comment repeated six times:
//#printer-messages
What is this for? Greeter.java is similar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.