samedi 1 août 2015

Spring Error creating bean

I am trying to run the following example . I am using Spring Tool Suite and I have create, a Spring MVC Project. I configure everything(I think). But I am getting the following exception: PasteBin Exception from server.

web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://ift.tt/ra1lAU"
    xmlns="http://ift.tt/nSRXKP"
    xsi:schemaLocation="http://ift.tt/nSRXKP http://ift.tt/LU8AHS"
    id="WebApp_ID" version="2.5">
    <display-name>SpringMVCloginExample</display-name>
    <servlet>
        <servlet-name>springLoginApplication</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/springWeb.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>springLoginApplication</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-app>

springBeanConfiguration.xml:

<beans xmlns="http://ift.tt/GArMu6"
        xmlns:context="http://ift.tt/GArMu7"
        xmlns:xsi="http://ift.tt/ra1lAU"
        xsi:schemaLocation="http://ift.tt/GArMu6
        http://ift.tt/QEDs1e
        http://ift.tt/GArMu7
        http://ift.tt/QEDs1k">
        <bean id="loginDelegate" class="com.havistudio.delegate.LoginDelegate">
            <property name="userService" ref="userService"></property>
        </bean>
        <bean id="userService" class="com.havistudio.service.impl.UserServiceImpl">
            <property name="userDao" ref="userDao"></property>
        </bean>
        <bean name="userDao" class="com.havistudio.dao.impl.UserDaoImpl">
            <property name="dataSource" ref="dataSource"></property>
        </bean>
        <bean id="dataSource"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
            <property name="driverClassName" value="com.mysql.jdbc.Driver" />
            <property name="url" value="jdbc:mysql://localhost:3306/sprinexamples" />
            <property name="username" value="root" />
            <property name="password" value="kostas" />
        </bean>
    </beans>

springWeb.xml:

    <beans xmlns="http://ift.tt/GArMu6"
        xmlns:context="http://ift.tt/GArMu7"
        xmlns:xsi="http://ift.tt/ra1lAU"
        xsi:schemaLocation="http://ift.tt/GArMu6
http://ift.tt/QEDs1e
       http://ift.tt/GArMu7
       http://ift.tt/QEDs1k">
        <context:component-scan base-package="com.havistudio" />
        <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
          <property name="prefix" value="/jsp/" />
          <property name="suffix" value=".jsp" />
       </bean>
        <import resource="springBeanConfiguration.xml"/>
    </beans>

I am new at the Spring Framework. Thanks.

Aucun commentaire:

Enregistrer un commentaire