我和其他 17 个人在一个 github 项目(https://github.com/teknomanBlade/eCommerce)上。问题是我无法运行该项目,我不知道错误是什么。我研究了很多,但我找不到该怎么做。(我们对休眠和春季几乎没有经验)。这是一个课程。
这是控制台错误:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring MVC Application 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.0:run (default-cli) @ ecommerce-web >>>
[WARNING] The artifact junit:junit-dep:jar:4.11 has been relocated to junit:junit:jar:4.11
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ ecommerce-web ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ecommerce-web ---
[INFO] Compiling 2 source files to C:\Users\Juan Martin\Documents\GitHub\eCommerce\ecommerce-web\target\classes
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.0:run (default-cli) @ ecommerce-web <<<
[WARNING] The artifact junit:junit-dep:jar:4.11 has been relocated to junit:junit:jar:4.11
[INFO]
[INFO] --- tomcat7-maven-plugin:2.0:run (default-cli) @ ecommerce-web ---
[INFO] Running war on http://localhost:8080/ecommerce-web
[INFO] Using existing Tomcat server configuration at C:\Users\Juan Martin\Documents\GitHub\eCommerce\ecommerce-web\target\tomcat
[INFO] create webapp with contextPath: /ecommerce-web
oct 03, 2013 12:29:20 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
oct 03, 2013 12:29:20 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
oct 03, 2013 12:29:20 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
oct 03, 2013 12:29:27 AM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [web.ecommerce.tpfinal.ecommerce_web.config.WebAppInitializer@5e3450d4]
oct 03, 2013 12:29:28 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
oct 03, 2013 12:29:34 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [web/ecommerce/tpfinal/ecommerce_web/config/WebMvcConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(java.lang.String)
to {[/buscar/**],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(int,int) mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(java.lang.String)
to {[/buscar/**],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(int,int) mapped.
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.registerHandlerMethod(AbstractHandlerMethodMapping.java:172)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:146)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:108)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:88)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:163)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
... 21 more
oct 03, 2013 12:29:34 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
oct 03, 2013 12:29:34 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ecommerce-web] startup failed due to previous errors
oct 03, 2013 12:29:34 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
oct 03, 2013 12:29:34 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/ecommerce-web] registered the JDBC driver [org.hsqldb.jdbc.JDBCDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
oct 03, 2013 12:29:34 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/ecommerce-web] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
oct 03, 2013 12:29:34 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/ecommerce-web] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
ERROR [localhost-startStop-1] (ContextLoader.java:319) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [web/ecommerce/tpfinal/ecommerce_web/config/WebMvcConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(java.lang.String)
to {[/buscar/**],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(int,int) mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(java.lang.String)
to {[/buscar/**],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'busqueda2Controller' bean method
public org.springframework.web.servlet.ModelAndView web.ecommerce.tpfinal.ecommerce_web.controller.Busqueda2Controller.busqueda(int,int) mapped.
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.registerHandlerMethod(AbstractHandlerMethodMapping.java:172)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:146)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:108)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:88)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:163)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
... 21 more
oct 03, 2013 12:29:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]