GithubHelp home page GithubHelp logo

lagom-java-maven-chirper-example's Introduction

This sample application is archived. See https://github.com/lagom/lagom-samples for more Example projects showcasing Lagom usage.

lagom-java-maven-chirper-example

A Lagom Java example showcasing a Twitter-like application, Maven flavor.

Running locally

  1. Start all services using mvn lagom:runAll.
  2. Open http://localhost:9000 in your browser.
  3. Register and Start Chirping!

Running on Kubernetes or DC/OS

The sbt flavor of this project is set up to run on Kubernetes and DC/OS.

lagom-java-maven-chirper-example's People

Contributors

benmccann avatar beritou avatar dotta avatar dwijnand avatar edwardcallahan avatar erip avatar fsat avatar guizmaii avatar huntc avatar ignasi35 avatar igorbolic avatar jroper avatar longshorej avatar marcospereira avatar markusjura avatar npmcdn-to-unpkg-bot avatar octonato avatar raboof avatar timmoore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lagom-java-maven-chirper-example's Issues

Build Failure using JDK 11

I get the following error when following the instructions in the readme. Any ideas?

Downloaded from central: https://repo.maven.apache.org/maven2/com/typesafe/akka/akka-http-core_2.12/10.1.5/akka-http-core_2.12-10.1.5.jar (3.5 MB at 686 kB/s)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/aaron/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-12-22T17:57:42.253Z [info] akka.event.slf4j.Slf4jLogger [] - Slf4jLogger started
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for lagom-java-chirper 1.0.0-SNAPSHOT:
[INFO] 
[INFO] lagom-java-chirper ................................. FAILURE [ 27.930 s]
[INFO] friend-api ......................................... SKIPPED
[INFO] friend-impl ........................................ SKIPPED
[INFO] chirp-api .......................................... SKIPPED
[INFO] chirp-impl ......................................... SKIPPED
[INFO] activity-stream-api ................................ SKIPPED
[INFO] activity-stream-impl ............................... SKIPPED
[INFO] load-test-api ...................................... SKIPPED
[INFO] load-test-impl ..................................... SKIPPED
[INFO] front-end .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  29.647 s
[INFO] Finished at: 2018-12-22T11:57:42-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lightbend.lagom:lagom-maven-plugin:1.5.0-RC1:runAll (default-cli) on project lagom-java-chirper: Execution lagom-internal-request of goal com.lightbend.lagom:lagom-maven-plugin:1.5.0-RC1:startServiceLocator failed: Failed to start embedded Service Locator or Service Gateway. Hint: Are ports 9008 or 9000 already in use?: Unable to create injector, see the following errors:
[ERROR] 
[ERROR] 1) Error in custom provider, java.lang.reflect.UndeclaredThrowableException
[ERROR]   at com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:142) (via modules: com.google.inject.util.Modules$OverrideModule -> com.lightbend.lagom.registry.impl.ServiceRegistryModule)
[ERROR]   while locating com.lightbend.lagom.javadsl.api.ServiceInfo
[ERROR]     for the 3rd parameter of com.lightbend.lagom.internal.javadsl.client.JavadslServiceClientImplementor.<init>(JavadslServiceClientImplementor.scala:37)
[ERROR]   at com.lightbend.lagom.internal.javadsl.client.ServiceClientModule.bindings(ServiceClientModule.scala:13):
[ERROR] Binding(class com.lightbend.lagom.internal.javadsl.client.JavadslServiceClientImplementor to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[ERROR]   while locating com.lightbend.lagom.internal.javadsl.client.JavadslServiceClientImplementor
[ERROR]     for the 4th parameter of com.lightbend.lagom.internal.javadsl.client.ServiceClientLoader.<init>(ServiceClientLoader.scala:15)
[ERROR]   at com.lightbend.lagom.internal.javadsl.client.ServiceClientModule.bindings(ServiceClientModule.scala:14):
[ERROR] Binding(class com.lightbend.lagom.internal.javadsl.client.ServiceClientLoader to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[ERROR]   while locating com.lightbend.lagom.internal.javadsl.client.ServiceClientLoader
[ERROR]     for field at com.lightbend.lagom.internal.javadsl.client.ServiceClientProvider.loader(ServiceClientLoader.scala:36)
[ERROR]   at com.lightbend.lagom.javadsl.client.ServiceClientGuiceSupport.bindClient(ServiceClientGuiceSupport.java:28) (via modules: com.google.inject.util.Modules$OverrideModule -> com.lightbend.lagom.registry.impl.ServiceRegistryModule)
[ERROR] 
[ERROR] 1 error: access to public member failed: com.lightbend.lagom.internal.javadsl.registry.ServiceRegistry.descriptor[Ljava.lang.Object;@4700064f/invokeSpecial, from com.lightbend.lagom.internal.javadsl.registry.ServiceRegistry/2 (unnamed module @4cd6f08b)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Java version

~/p/m/s/lagom-java-maven-chirper-example (master=) java --version
java 11.0.1 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

Maven Version

~/p/m/s/lagom-java-maven-chirper-example (master=) mvn --version
Apache Maven 3.6.0 (NON-CANONICAL_2018-11-06T03:14:22+01:00_root; 2018-11-05T20:14:22-06:00)
Maven home: /opt/maven
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-11-jdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.19.8-arch1-1-arch", arch: "amd64", family: "unix"

Front end doesn't show up after running mvn lagom:runAll

It throws the following error

Action Not Found

For request 'GET /'
These routes have been tried, in this order:

1GET\Q/api/users/\E([^/]+)Service: friendservice (http://0.0.0.0:60399)

2POST\Q/api/users\EService: friendservice (http://0.0.0.0:60399)

3POST\Q/api/users/\E([^/]+)\Q/friends\EService: friendservice (http://0.0.0.0:60399)

4GET\Q/api/users/\E([^/]+)\Q/followers\EService: friendservice (http://0.0.0.0:60399)

5POST\Q/api/chirps/live/\E([^/]+)Service: chirpservice (http://0.0.0.0:54485)

6GET\Q/api/chirps/live\EService: chirpservice (http://0.0.0.0:54485)

7GET\Q/api/chirps/history\EService: chirpservice (http://0.0.0.0:54485)

8GET\Q/api/activity/\E([^/]+)\Q/live\EService: activityservice (http://0.0.0.0:51855)

9GET\Q/api/activity/\E([^/]+)\Q/history\EService: activityservice (http://0.0.0.0:51855)

Error while accessing the application

I cloned the project and tried to access the application through browser. I get error as:

ProvisionException: Unable to provision, see the following errors:

  1. No implementation for com.lightbend.lagom.javadsl.server.LagomServiceRouter was bound.
    while locating com.lightbend.lagom.javadsl.server.LagomServiceRouter
    while locating play.api.inject.RoutesProvider
    while locating play.api.routing.Router
    for the 1st parameter of play.api.http.JavaCompatibleHttpRequestHandler.(HttpRequestHandler.scala:217)
    while locating play.api.http.JavaCompatibleHttpRequestHandler
    while locating play.api.http.HttpRequestHandler
    for the 6th parameter of play.api.DefaultApplication.(Application.scala:236)
    at play.api.DefaultApplication.class(Application.scala:235)
    while locating play.api.DefaultApplication
    while locating play.api.Application

1 error

How to handle this issue?

Error while accessing the application

Hi,

I get following error when I try to access application with: localhost:9000

ProvisionException: Unable to provision, see the following errors:

  1. No implementation for com.lightbend.lagom.javadsl.server.LagomServiceRouter was bound.
    while locating com.lightbend.lagom.javadsl.server.LagomServiceRouter
    while locating play.api.inject.RoutesProvider
    while locating play.api.routing.Router
    for the 1st parameter of play.api.http.JavaCompatibleHttpRequestHandler.(HttpRequestHandler.scala:217)
    while locating play.api.http.JavaCompatibleHttpRequestHandler
    while locating play.api.http.HttpRequestHandler
    for the 6th parameter of play.api.DefaultApplication.(Application.scala:236)
    at play.api.DefaultApplication.class(Application.scala:235)
    while locating play.api.DefaultApplication
    while locating play.api.Application

1 error

I have followed the instructions on READ.md.

How to solve this issue?

Maven build failure

I took latest of the project, and performed 'mvn clean install'. I get following error:

[INFO] Reactor Summary:
[INFO]
[INFO] lagom-java-chirper ................................. SUCCESS [ 1.404 s]
[INFO] friend-api ......................................... SUCCESS [ 2.364 s]
[INFO] friend-impl ........................................ SUCCESS [04:09 min]
[INFO] chirp-api .......................................... SUCCESS [ 1.377 s]
[INFO] chirp-impl ......................................... SUCCESS [ 42.104 s]
[INFO] activity-stream-api ................................ SUCCESS [ 0.446 s]
[INFO] activity-stream-impl ............................... SUCCESS [ 16.528 s]
[INFO] load-test-api ...................................... SUCCESS [ 0.365 s]
[INFO] load-test-impl ..................................... SUCCESS [ 7.104 s]
[INFO] front-end .......................................... FAILURE [ 29.443 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:51 min
[INFO] Finished at: 2018-10-27T08:21:10+05:30
[INFO] Final Memory: 112M/1127M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lightbend.rp:reactive-app-maven-plugin:0.3.0:build (build-docker) on project front-end: Execution build-docker of goal com.lightbend.rp:reactive-app-maven-plugin:0.3.0:build failed: java.lang.reflect.InvocationTargetException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

Am I missing something here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.