Comments (6)
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.
@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.
@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.
$ 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.
@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.
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)
- Send dynamic JSON HOT 1
- Example code includes broken on production GS site! HOT 1
- Rest Service guide is missing source code for RestServiceApplication.java HOT 5
- Getting Whitelabel Error Page with status "404" While running Spring Boot Application HOT 2
- Application finishing & exiting immediately HOT 1
- complete and initial samples have duplicated project name HOT 1
- pom.xml is not xml?!
- Aprender Sprin boot
- https://github.com/spring-guides/gs-rest-service.git HOT 3
- Plugin 'jetty' not found with gradle
- Upgrade Spring Boot to the latest version HOT 2
- Update Spring Boot version HOT 1
- Jackson links in README need updating
- complete version seems to missing bean validator implementation HOT 1
- Cannot GET /greeting when running the complete folder
- Session "Build with Maven" doesn't expand when clicked on Firefox HOT 1
- HTTP 404 Status with spring boot 1.5.17.RELEASE HOT 1
- Caused by: java.lang.ClassNotFoundException: org.springframework.data.repository.CrudRepository HOT 1
- java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration HOT 4
- What is the usage of initial directory? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gs-rest-service.