• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SpringBoot app not working

 
Ranch Hand
Posts: 546
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I used Spring Initaliazr to download a Maven project, only selected Web. I added a test controller, and tried starting the app. I get this error:



Here's my pom.xml; it's unmodified from the downloaded version.



Could someone kindly check and let me know how the error can be resolved?
 
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps you miss this in pom.xml ?
 
Ranch Hand
Posts: 36
Mac OS X Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest deleting your local maven repository and try compiling/building project.
It seems like some jar file did not get correctly downloaded to your system.
 
Prasanna Raman
Ranch Hand
Posts: 546
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankur R Jain wrote:I would suggest deleting your local maven repository and try compiling/building project.
It seems like some jar file did not get correctly downloaded to your system.

Could you please tell me how I do this?
 
Ankur R Jain
Ranch Hand
Posts: 36
Mac OS X Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Prasanna Raman wrote:Could you please tell me how I do this?



Yes, please navigate to your user directory (using one of the following default locations) and find .m2 folder down there, go inside it, and delete the repository folder, now clean build the project in your IDE.

Default locations of .m2:

Unix/Mac OS X – ~/.m2
WindowsXP – C:\Documents and Settings\{your-username}\.m2
Windows Vista and above - C:\Users\{your-username}\.m2

Note: .m2 folder might be hidden and you can directly navigate into it by using address bar or use 'show hidden files' option.
 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I noticed the other day with my SpringBoot 2.0 M7 project that when I start it up the first line in the log shown by IntelliJ is
DEBUG StatusLogger org.slf4j.helpers.Log4jLoggerFactory is not on classpath. Good!
I'm also using Gradle instead of Maven, so this could matter.

What version of SpringBoot are you using Prasanna?

I only say all this because, maybe the absence of the dependency as pointed out by Ankur is not the issue.
 
Prasanna Raman
Ranch Hand
Posts: 546
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankur R Jain wrote:

Prasanna Raman wrote:Could you please tell me how I do this?



Yes, please navigate to your user directory (using one of the following default locations) and find .m2 folder down there, go inside it, and delete the repository folder, now clean build the project in your IDE.

Default locations of .m2:

Unix/Mac OS X – ~/.m2
WindowsXP – C:\Documents and Settings\{your-username}\.m2
Windows Vista and above - C:\Users\{your-username}\.m2

Note: .m2 folder might be hidden and you can directly navigate into it by using address bar or use 'show hidden files' option.



Thank you very much, this worked.
 
Prasanna Raman
Ranch Hand
Posts: 546
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pete Letkeman wrote:I noticed the other day with my SpringBoot 2.0 M7 project that when I start it up the first line in the log shown by IntelliJ is
DEBUG StatusLogger org.slf4j.helpers.Log4jLoggerFactory is not on classpath. Good!
I'm also using Gradle instead of Maven, so this could matter.

What version of SpringBoot are you using Prasanna?

I only say all this because, maybe the absence of the dependency as pointed out by Ankur is not the issue.

I'm using 1.5.9
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you Application is in this package: package com.spring.app; which means your Application full path should be package com.spring.app.Application and your error code said com.spring.Application not found. Maybe you should check your run configuration.
 
sonai kale
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove <scope>provided</scope> from pom.xml and try re-running. Use provided if you wish to deploy the war to any other standalone tomcat.
 
Let's go to the waterfront with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic