Giter VIP home page Giter VIP logo

Comments (6)

aanfarhan avatar aanfarhan commented on August 22, 2024

Yes, I'm also couldn't run the application. It's always terminated, the servlet service doesn't started.
This is my console log message:
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _ | \ \ \
/ )| |)| | | | | || (_| | ) ) ) )
' |__
| .**|| ||| |**, | / / / /
=========||==============|/=///_/
�[32m :: Spring Boot :: �[39m �[2m (v1.4.0.RELEASE)�[0;39m

�[2m2016-09-04 21:36:55.285�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ main]�[0;39m �[36mhello.Application �[0;39m �[2m:�[0;39m Starting Application on farhan with PID 11810 (/home/farhan/Spring/Projects/gs-rest-hateoas-complete/target/classes started by farhan in /home/farhan/Spring/Projects/gs-rest-hateoas-complete)
�[2m2016-09-04 21:36:55.290�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ main]�[0;39m �[36mhello.Application �[0;39m �[2m:�[0;39m No active profile set, falling back to default profiles: default
�[2m2016-09-04 21:36:55.374�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ main]�[0;39m �[36ms.c.a.AnnotationConfigApplicationContext�[0;39m �[2m:�[0;39m Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5af3afd9: startup date [Sun Sep 04 21:36:55 WIB 2016]; root of context hierarchy
�[2m2016-09-04 21:36:56.866�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ main]�[0;39m �[36mo.s.j.e.a.AnnotationMBeanExporter �[0;39m �[2m:�[0;39m Registering beans for JMX exposure on startup
�[2m2016-09-04 21:36:56.884�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ main]�[0;39m �[36mhello.Application �[0;39m �[2m:�[0;39m Started Application in 2.067 seconds (JVM running for 2.561)
�[2m2016-09-04 21:36:56.885�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ Thread-1]�[0;39m �[36ms.c.a.AnnotationConfigApplicationContext�[0;39m �[2m:�[0;39m Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5af3afd9: startup date [Sun Sep 04 21:36:55 WIB 2016]; root of context hierarchy
�[2m2016-09-04 21:36:56.888�[0;39m �[32m INFO�[0;39m �[35m11810�[0;39m �[2m---�[0;39m �[2m[ Thread-1]�[0;39m �[36mo.s.j.e.a.AnnotationMBeanExporter �[0;39m �[2m:�[0;39m Unregistering JMX-exposed beans on shutdown
`

I'm really new to spring.. don't know how to solve the problem.

from gs-rest-service.

dsyer avatar dsyer commented on August 22, 2024

@aanfarhan if looks like you are running a different guide (it says gs-rest-hateoas in your logs). It also looks like you don't have a server running, probably because of something missing from the classpath, so the app just exits as soon as it starts.

from gs-rest-service.

ananthashankar avatar ananthashankar commented on August 22, 2024

@dsyer could you please tell what would be the reason in my case. link for my code https://github.com/ananthashankar/Rest-Services/tree/master/Greetings

from gs-rest-service.

gregturn avatar gregturn commented on August 22, 2024
$ git clone [email protected]:ananthashankar/Rest-Services.git
Cloning into 'Rest-Services'...
remote: Counting objects: 28, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 28 (delta 1), reused 25 (delta 0), pack-reused 0
...
$ cd Greetings/
$ mvn clean spring-boot:run
...
2016-09-04 14:17:18.980  INFO 78910 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-09-04 14:17:19.031  INFO 78910 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-09-04 14:17:19.035  INFO 78910 --- [           main] Greetings.Web_Services.App               : Started App in 1.941 seconds (JVM running for 8.009)
2016-09-04 14:17:27.703  INFO 78910 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'

Your repo launched on my machine.

Then, in another panel..

$ curl -v localhost:8080/greeting
*   Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /greeting HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 200 
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Sun, 04 Sep 2016 19:17:27 GMT
< 
* Connection #0 to host localhost left intact
{"id":1,"content":"Hello, World!"}
$ curl -v localhost:8080/greeting?name=Greg
*   Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /greeting?name=Greg HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 200 
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Sun, 04 Sep 2016 19:17:43 GMT
< 
* Connection #0 to host localhost left intact
{"id":2,"content":"Hello, Greg!"}

Looks good to me. Inside STS, did you right click the class with @SpringBootApplication annotation, and select "Run"?

from gs-rest-service.

ananthashankar avatar ananthashankar commented on August 22, 2024

@gregturn Thanks for the reply. Surprisingly it seems to be working now. All this time whenever I tried I was getting the above screenshot error. All I did was updating the project before running. I had updated the project several times before as well but it only worked this time. Neither it was working with Spring's starter guide code and I was running them as a SpringBoot app. Could you please tell what possible mistake I would've done in STS so that I won't repeat the same in future.

from gs-rest-service.

dsyer avatar dsyer commented on August 22, 2024

Refreshing and updating in STS will certainly help. It seems like there isn't actually a problem with the guide though.

from gs-rest-service.

Related Issues (20)

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.