Not able to run initial project | Spring Boot Forum
Y
Yamini Jyoshna Posted on 02/12/2020

Sir,

 

I tried multiple times but not able run my initial Home project. I am getting below error and also attached the code. Thank you in advance.Please find attached code.


Y
Yamini Jyoshna Replied on 02/12/2020

"C:\Program Files (x86)\Java\jdk1.8.0_241\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\P2845680\Downloads\MVCSpringWithBootSpring\MVCSpringWithBootSpring "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\lib\idea_rt.jar=51270:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2020.2.1 org.springframework.boot:spring-boot-maven-plugin:2.3.5.RELEASE:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.test:MVCSpringWithBootSpring >------------------
[INFO] Building MVCSpringWithBootSpring 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.3.5.RELEASE:run (default-cli) > test-compile @ MVCSpringWithBootSpring >>>
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ MVCSpringWithBootSpring ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 52 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ MVCSpringWithBootSpring ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to C:\Users\P2845680\Downloads\MVCSpringWithBootSpring\MVCSpringWithBootSpring\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ MVCSpringWithBootSpring ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\P2845680\Downloads\MVCSpringWithBootSpring\MVCSpringWithBootSpring\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ MVCSpringWithBootSpring ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\P2845680\Downloads\MVCSpringWithBootSpring\MVCSpringWithBootSpring\target\test-classes
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.3.5.RELEASE:run (default-cli) < test-compile @ MVCSpringWithBootSpring <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.5.RELEASE:run (default-cli) @ MVCSpringWithBootSpring ---
[INFO] Attaching agents: []

. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.5.RELEASE)

2020-12-01 17:36:47.268 INFO 21844 --- [ main] c.t.MvcSpringWithBootSpringApplication : Starting MvcSpringWithBootSpringApplication on CORVSEGAL4147LL with PID 21844 (C:\Users\P2845680\Downloads\MVCSpringWithBootSpring\MVCSpringWithBootSpring\target\classes started by P2845680 in C:\Users\P2845680\Downloads\MVCSpringWithBootSpring\MVCSpringWithBootSpring)
2020-12-01 17:36:47.272 INFO 21844 --- [ main] c.t.MvcSpringWithBootSpringApplication : No active profile set, falling back to default profiles: default
2020-12-01 17:36:47.952 INFO 21844 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2020-12-01 17:36:47.972 INFO 21844 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13ms. Found 0 JPA repository interfaces.
2020-12-01 17:36:48.647 INFO 21844 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-12-01 17:36:48.656 INFO 21844 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-12-01 17:36:48.657 INFO 21844 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39]
2020-12-01 17:36:48.939 INFO 21844 --- [ main] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2020-12-01 17:36:48.943 INFO 21844 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-12-01 17:36:48.943 INFO 21844 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1610 ms
2020-12-01 17:36:49.113 INFO 21844 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-12-01 17:36:49.153 INFO 21844 --- [ task-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-12-01 17:36:49.224 INFO 21844 --- [ task-1] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.22.Final
2020-12-01 17:36:49.311 WARN 21844 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-12-01 17:36:49.395 INFO 21844 --- [ task-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-12-01 17:36:49.463 INFO 21844 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-12-01 17:36:49.464 INFO 21844 --- [ main] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories?
2020-12-01 17:36:49.464 INFO 21844 --- [ main] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
2020-12-01 17:36:49.472 INFO 21844 --- [ main] c.t.MvcSpringWithBootSpringApplication : Started MvcSpringWithBootSpringApplication in 2.688 seconds (JVM running for 2.984)
2020-12-01 17:36:49.487 INFO 21844 --- [ task-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-12-01 17:36:50.150 INFO 21844 --- [ task-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-12-01 17:36:50.168 INFO 21844 --- [ task-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2020-12-01 17:36:50.393 INFO 21844 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-12-01 17:36:50.401 INFO 21844 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-12-01 17:37:08.177 INFO 21844 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-12-01 17:37:08.177 INFO 21844 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-12-01 17:37:08.183 INFO 21844 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 6 ms
in home controller
2020-12-01 17:37:08.274 WARN 21844 --- [nio-8080-exec-2] o.s.web.servlet.PageNotFound : No mapping for GET /favicon.ico


Y
Yogesh Chawla Replied on 02/12/2020

Did you create this Project with Maven or with Spring Boot?

 

Please paste your pom.xml also. I will try to figure out the problem and let you know.


Y
Yamini Jyoshna Replied on 03/12/2020

Sir,

Please find my attached pom.xml. I have used Intellij.


Y
Yamini Jyoshna Replied on 03/12/2020

pom.xml


Y
Yogesh Chawla Replied on 03/12/2020

So you have created the project using Spring Boot. Your logs also shows that the control successfully reached to the Home Controller class.

2020-12-01 17:37:08.183 INFO 21844 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 6 ms
in home controller

After that, It could not find the mapping for /home. Now Paste your HomeController class and other classes here or you can paste in the mail also at info@javaspringhibernate.com. 

 


M
Replied on 28/12/2020

please find the zip file of my project.