2016-04-15 17 views
0

Ich lade Lösung und Fach 2 Tutorials mit Netbeans 8.1 von und P1. Spring Hibernate Integration Example Tutorial (Spring 4 + Hibernate 3 and Hibernate 4) P2. Spring MVC Hibernate MySQL Integration CRUD Example Tutorial Ursprüngliche Projekte war mit Sonnenfinsternis. Ich habe Netbeans benutzt.Frühling, Winterschlaf, MVC, wie zu erkennen, was ist falsch mit Zuordnung

P1 Funktioniert gut.

wenn ich P2 laufen Ich habe:

HTTP-Status 404 - und Keine Zuordnung für HTTP-Anforderung mit URI gefunden wie weiter unten sehen.

15-Apr-2016 14:59:46.813 INFO [http-apr-8080-exec-24] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\IT\apache-tomcat-8.0.32\conf\Catalina\localhost\SpringMVCHibernate.xml 
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started 
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Fri Apr 15 14:59:57 CDT 2016]; root of context hierarchy 
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml] 
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 383 ms 
INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appServlet': initialization started 
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'appServlet-servlet': startup date [Fri Apr 15 14:59:58 CDT 2016]; parent: Root WebApplicationContext 
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml] 
INFO : org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/persons],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.listPersons(org.springframework.ui.Model) 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/person/add],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.addPerson(com.journaldev.spring.model.Person) 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/remove/{id}],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.removePerson(int) 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/edit/{id}],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.editPerson(int,org.springframework.ui.Model) 
INFO : org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0' 
INFO : org.hibernate.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {4.0.4.Final} 
INFO : org.hibernate.Version - HHH000412: Hibernate Core {4.3.5.Final} 
INFO : org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found 
INFO : org.hibernate.cfg.Environment - HHH000021: Bytecode provider name : javassist 
INFO : org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect 
INFO : org.hibernate.engine.jdbc.internal.LobCreatorBuilder - HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4 
INFO : org.hibernate.engine.transaction.internal.TransactionFactoryInitiator - HHH000399: Using default transaction strategy (direct JDBC transactions) 
INFO : org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory - HHH000397: Using ASTQueryTranslatorFactory 
INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appServlet': initialization completed in 8082 ms 
15-Apr-2016 15:00:06.429 INFO [http-apr-8080-exec-24] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\IT\apache-tomcat-8.0.32\conf\Catalina\localhost\SpringMVCHibernate.xml has finished in 19,616 ms 
15-Apr-2016 15:00:06.433 INFO [http-apr-8080-exec-22] org.apache.catalina.util.LifecycleBase.start The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SpringMVCHibernate]] after start() had already been called. The second call will be ignored. 
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/SpringMVCHibernate/] in DispatcherServlet with name 'appServlet' 

Hier ist, was eingesetzt wurde, ist:

Volume in drive C is OS 
Volume Serial Number is ... 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   META-INF 
04/15/2016 02:59 PM <DIR>   WEB-INF 
       0 File(s)    0 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\META-INF 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 07:45 AM    77 context.xml 
04/15/2016 07:55 AM    125 MANIFEST.MF 
04/15/2016 02:59 PM <DIR>   maven 
04/15/2016 07:55 AM     0 war-tracker 
       3 File(s)   202 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\META-INF\maven 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   com.journaldev.spring 
       0 File(s)    0 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\META-INF\maven\com.journaldev.spring 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   SpringMVCHibernate 
       0 File(s)    0 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\META-INF\maven\com.journaldev.spring\SpringMVCHibernate 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 07:55 AM    144 pom.properties 
04/15/2016 07:55 AM    6,127 pom.xml 
       2 File(s)   6,271 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   classes 
04/15/2016 02:59 PM <DIR>   lib 
04/15/2016 02:59 PM <DIR>   spring 
04/15/2016 02:59 PM <DIR>   views 
07/19/2014 08:58 PM    1,206 web.xml 
       1 File(s)   1,206 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   com 
04/15/2016 07:55 AM    1,111 log4j.xml 
       1 File(s)   1,111 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes\com 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   journaldev 
       0 File(s)    0 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes\com\journaldev 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   spring 
       0 File(s)    0 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes\com\journaldev\spring 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   dao 
04/15/2016 02:59 PM <DIR>   model 
04/15/2016 07:55 AM    2,576 PersonController.class 
04/15/2016 02:59 PM <DIR>   service 
       1 File(s)   2,576 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes\com\journaldev\spring\dao 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 07:55 AM    428 PersonDAO.class 
04/15/2016 07:55 AM    3,306 PersonDAOImpl.class 
       2 File(s)   3,734 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes\com\journaldev\spring\model 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 07:55 AM    1,534 Person.class 
       1 File(s)   1,534 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\classes\com\journaldev\spring\service 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 07:55 AM    440 PersonService.class 
04/15/2016 07:55 AM    1,587 PersonServiceImpl.class 
       2 File(s)   2,027 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\lib 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
02/28/2015 04:11 PM   445,288 antlr-2.7.7.jar 
03/15/2015 11:53 AM    4,467 aopalliance-1.0.jar 
04/06/2016 12:33 PM   119,683 aspectjrt-1.7.4.jar 
03/15/2015 11:53 AM   160,519 commons-dbcp-1.4.jar 
03/15/2015 11:53 AM   96,221 commons-pool-1.5.4.jar 
02/28/2015 04:11 PM   313,898 dom4j-1.6.1.jar 
03/15/2015 12:10 PM   75,311 hibernate-commons-annotations-4.0.4.Final.jar 
03/15/2015 12:10 PM   5,230,007 hibernate-core-4.3.5.Final.jar 
04/06/2016 12:33 PM   645,914 hibernate-entitymanager-4.3.5.Final.jar 
02/28/2015 04:08 PM   113,371 hibernate-jpa-2.1-api-1.0.0.Final.jar 
02/28/2015 04:11 PM   76,551 jandex-1.1.0.Final.jar 
02/28/2015 04:11 PM   714,194 javassist-3.18.1-GA.jar 
02/27/2015 11:25 AM    2,497 javax.inject-1.jar 
02/28/2015 04:08 PM   57,183 jboss-logging-3.1.3.GA.jar 
02/28/2015 04:08 PM   11,558 jboss-logging-annotations-1.2.0.Beta1.jar 
02/28/2015 04:08 PM   27,717 jboss-transaction-api_1.2_spec-1.0.0.Final.jar 
03/14/2015 08:32 AM   16,517 jcl-over-slf4j-1.7.5.jar 
02/28/2015 04:11 PM   414,240 jstl-1.2.jar 
03/16/2016 02:50 PM   391,834 log4j-1.2.15.jar 
03/15/2015 11:53 AM   724,213 mysql-connector-java-5.1.9.jar 
03/14/2015 08:32 AM   26,084 slf4j-api-1.7.5.jar 
04/06/2016 09:46 AM    8,869 slf4j-log4j12-1.7.5.jar 
03/15/2015 11:53 AM   352,700 spring-aop-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   669,978 spring-beans-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   974,938 spring-context-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   973,502 spring-core-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   204,745 spring-expression-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   424,466 spring-jdbc-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   366,892 spring-orm-4.0.3.RELEASE.jar 
03/15/2015 11:53 AM   248,201 spring-tx-4.0.3.RELEASE.jar 
04/09/2015 11:22 AM   667,960 spring-web-4.0.3.RELEASE.jar 
04/09/2015 11:22 AM   662,385 spring-webmvc-4.0.3.RELEASE.jar 
02/28/2015 04:12 PM   109,318 xml-apis-1.0.b2.jar 
       33 File(s)  15,331,221 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\spring 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
04/15/2016 02:59 PM <DIR>   appServlet 
07/19/2014 08:58 PM    380 root-context.xml 
       1 File(s)   380 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\spring\appServlet 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
07/19/2014 08:58 PM    3,242 servlet-context.xml 
       1 File(s)   3,242 bytes 

... apache-tomcat-8.0.32\webapps\SpringMVCHibernate\WEB-INF\views 

04/15/2016 02:59 PM <DIR>   . 
04/15/2016 02:59 PM <DIR>   .. 
07/19/2014 08:58 PM    2,484 person.jsp 
       1 File(s)   2,484 bytes 

    Total Files Listed: 
       49 File(s)  15,355,988 bytes 

Meine Frage ist, solange ich die Originaldateien bleiben, wie kann ich erkennen, was mit Mapping falsch ist?

Vielen Dank für Hilfe.

M Toma

aktualisieren

personControler.java

package com.journaldev.spring; 

import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.beans.factory.annotation.Qualifier; 
import org.springframework.stereotype.Controller; 
import org.springframework.ui.Model; 
import org.springframework.web.bind.annotation.ModelAttribute; 
import org.springframework.web.bind.annotation.PathVariable; 
import org.springframework.web.bind.annotation.RequestMapping; 
import org.springframework.web.bind.annotation.RequestMethod; 

import com.journaldev.spring.model.Person; 
import com.journaldev.spring.service.PersonService; 

@Controller 
public class PersonController { 

    private PersonService personService; 

    @Autowired(required=true) 
    @Qualifier(value="personService") 
    public void setPersonService(PersonService ps){ 
     this.personService = ps; 
    } 

    @RequestMapping(value = "/persons", method = RequestMethod.GET) 
    public String listPersons(Model model) { 
     model.addAttribute("person", new Person()); 
     model.addAttribute("listPersons", this.personService.listPersons()); 
     return "person"; 
    } 

    //For add and update person both 
    @RequestMapping(value= "/person/add", method = RequestMethod.POST) 
    public String addPerson(@ModelAttribute("person") Person p){ 

     if(p.getId() == 0){ 
      //new person, add it 
      this.personService.addPerson(p); 
     }else{ 
      //existing person, call update 
      this.personService.updatePerson(p); 
     } 

     return "redirect:/persons"; 

    } 

    @RequestMapping("/remove/{id}") 
    public String removePerson(@PathVariable("id") int id){ 

     this.personService.removePerson(id); 
     return "redirect:/persons"; 
    } 

    @RequestMapping("/edit/{id}") 
    public String editPerson(@PathVariable("id") int id, Model model){ 
     model.addAttribute("person", this.personService.getPersonById(id)); 
     model.addAttribute("listPersons", this.personService.listPersons()); 
     return "person"; 
    } 

} 

Wenn ich die Anwendung in netbeas laufen, ist es derjenige, bereitstellen und Web auf Sever starten. Ich bin nicht derjenige, der URL Adresse schreibt.

Netbeans lassen Sie mich mit der rechten Maustaste auf Menü (Server - Tomcat - SpringMVCHibernate) zu starten, zu stoppen, im Browser öffnen.

Ich versuchte einige andere URL-Adresse, aber keinen Erfolg.

Alle Quellen können auf der Adresse von P2 gesehen werden.

aktualisieren

I log4j.xml Ebene ändern und unten ist, was ich für Open in Browser erhalten:

TRACE: org.springframework.web.servlet.DispatcherServlet - Bound request context to thread: uri: /SpringMVCHibernate/ 
method: GET 
QueryString: null 
Parameters: 
Headers: 
    Name: host Value: localhost:8080 
    Name: user-agent Value: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 
    Name: accept Value: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
    Name: accept-language Value: en-US,en;q=0.5 
    Name: accept-encoding Value: gzip, deflate 
    Name: dnt Value: 1 
    Name: connection Value: keep-alive 

DEBUG: org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'appServlet' processing GET request for [/SpringMVCHibernate/] 
TRACE: org.springframework.web.servlet.DispatcherServlet - Testing handler map [org.springframework[email protected]43edc0b9] in DispatcherServlet with name 'appServlet' 
DEBUG: org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking up handler method for path/
DEBUG: org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Did not find handler method for [/] 
TRACE: org.springframework.web.servlet.DispatcherServlet - Testing handler map [or[email protected]170563eb] in DispatcherServlet with name 'appServlet' 
TRACE: org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping - No handler mapping found for [/] 
TRACE: org.springframework.web.servlet.DispatcherServlet - Testing handler map [[email protected]5256ecaa] in DispatcherServlet with name 'appServlet' 
TRACE: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - No handler mapping found for [/] 
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/SpringMVCHibernate/] in DispatcherServlet with name 'appServlet' 
TRACE: org.springframework.web.servlet.DispatcherServlet - Cleared thread-bound request context: uri: /SpringMVCHibernate/ 
method: GET 
QueryString: null 
Parameters: 
Headers: 
    Name: host Value: localhost:8080 
    Name: user-agent Value: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 
    Name: accept Value: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
    Name: accept-language Value: en-US,en;q=0.5 
    Name: accept-encoding Value: gzip, deflate 
    Name: dnt Value: 1 
    Name: connection Value: keep-alive 

DEBUG: org.springframework.web.servlet.DispatcherServlet - Successfully completed request 
TRACE: org.springframework.web.context.support.XmlWebApplicationContext - Publishing event in WebApplicationContext for namespace 'appServlet-servlet': ServletRequestHandledEvent: url=[/SpringMVCHibernate/]; client=[127.0.0.1]; method=[GET]; servlet=[appServlet]; session=[null]; user=[null]; time=[2ms]; status=[OK] 
TRACE: org.springframework.web.context.support.XmlWebApplicationContext - Publishing event in Root WebApplicationContext: ServletRequestHandledEvent: url=[/SpringMVCHibernate/]; client=[127.0.0.1]; method=[GET]; servlet=[appServlet]; session=[null]; user=[null]; time=[2ms]; status=[OK] 

Ich denke, dass einige relevante Fragen sind:
Was ist die beabsichtigte Verwendung von servlet-context.xml, root-context.xml und web.xml?
Warum erstellt DispatcherServlet einen anderen Anwendungskontext?
Kontextinitialisierung fehlgeschlagen oder Laden von Eigenschaften
Wie genau sind der Stammkontext und der Dispatcher-Servlet-Kontext in einer Spring MVC-Webanwendung?

Versuchen Sie das Beispiel auf Eclipse und erhalten das gleiche auszuführen:

WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/SpringMVCHibernate/] in DispatcherServlet with name 'appServlet' 

Immer noch nicht wissen, wie sie zu beheben und wie zu erkennen, was falsch ist mit der Anwendung. Danke für Hilfe.

+0

denke ich Menschen, die helfen kann, ist: @Neil McGuigan – MToma

+0

Und andere, die @ Ryan Stewart – MToma

+0

Und @Tomasz Nurkiewicz – MToma

Antwort

0

Sie haben eine Controller in Ihrem Projekt, und es verarbeitet eine bestimmte Gruppe von URLs. Es wird in Ihrem Projekt auf der Protokollebene INFO erwähnt.

INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/persons],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.listPersons(org.springframework.ui.Model) 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/person/add],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.addPerson(com.journaldev.spring.model.Person) 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/remove/{id}],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.removePerson(int) 
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/edit/{id}],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.journaldev.spring.PersonController.editPerson(int,org.springframework.ui.Model) 
INFO : org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0' 

Es ist:

/persons 
/person/add 
/remove/{id} 
/edit/{id} 

Die Warnung Sie haben, ist, weil Sie eine Url mit dieser Form genannt:

http://localhost:xxxx/SpringMVCHibernate/ 

, die nicht auf Ihrem Servlet abgebildet wird.

+0

Wenn ich das Projekt starte, bekomme ich 404 für http: // localhost: 8080/SpringMVCHibernate/Ist es das, was du gesagt hast? – MToma

+0

@MToma localhost: 8080/SpringMVCHibernate/ –

+0

Ich verstehe nicht, was falsch ist. – MToma

0

I Tray wieder das Beispiel in Netbeans und es funktioniert. Ich war falsch von einer Seite auf URL zu sehen erwarten: http://localhost:8080/SpringMVCHibernate Wenn ich die URL zu ändern: http://localhost:8080/SpringMVCHibernate/persons bekomme ich einen Fehler:

HTTP Status 500 – Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection 
… 
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class ‘com.mysql.jdbc.Driver’ 

ich den mysql-connector hinzufügen, und ich sehe tha rechte Seite; Danke für jeden Kommentar M. Toma