I have created login application using spring in my local machine using Apache + Eclipse.
I exported WAR of the same without setting the target server as i am deploying the same on sun web server.
Application successfully deployed on sun web server.
Successfully opens welcome page when click on for further process it gives below error.

Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]

I have searched a lot but didnt succeed.
Need help for the same.

and you think we have access to your code?
it would appear that the application has trouble "creating the bean with name 'urlMapping'" which you defined in your dispatcher-servlet.xml file, but that's as good as I'll be able to say.

Thanks for your reply.
But my application is working fine with apache server.

Below is my dispatcher xml file code.

<?xml version="1.0" encoding="UTF-8"?>
<beans

<?xml version="1.0" encoding="UTF-8"?>
<beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" 
    xmlns:p="http://www.springframework.org/schema/p">      
     <bean id="viewResolver"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">

        <property name="prefix">
            <value>/WEB-INF/jsp/</value>
        </property>
        <property name="suffix">
            <value>.jsp</value>
        </property>
    </bean>
    <bean id="urlMapping"
        class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="interceptors">
            <list>
                <ref local="localeChangeInterceptor"/>
            </list>
        </property>
        <property name="urlMap">
            <map>               
                <entry key="/login.html">
                    <ref bean="loginController"/>
                </entry>             
            </map>           
        </property>              
    </bean>  
     <bean id="loginValidator" class="net.roseindia.web.LoginValidator"/>
     <bean id="loginController" class="net.roseindia.web.LoginFormController">
        <property name="sessionForm"><value>false</value></property>
        <property name="commandName"><value>login</value></property>
        <property name="commandClass"><value>net.roseindia.web.Login</value></property>
        <property name="validator"><ref bean="loginValidator"/></property>     
        <property name="formView"><value>login</value></property>
        <property name="successView"><value>success</value></property>
    </bean>      
    <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
        <property name="paramName" value="hl"/>
    </bean>  
    <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/>      
</beans>


xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" 
xmlns:p="http://www.springframework.org/schema/p">      
 <bean id="viewResolver"
    class="org.springframework.web.servlet.view.InternalResourceViewResolver">

    <property name="prefix">
        <value>/WEB-INF/jsp/</value>
    </property>
    <property name="suffix">
        <value>.jsp</value>
    </property>
</bean>
<bean id="urlMapping"
    class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="interceptors">
        <list>
            <ref local="localeChangeInterceptor"></ref>
        </list>
    </property>
    <property name="urlMap">
        <map>               
            <entry key="/login.html">
                <ref bean="loginController"></ref>
            </entry>             
        </map>           
    </property>              
</bean>  
 <bean id="loginValidator" class="net.roseindia.web.LoginValidator"></bean>
 <bean id="loginController" class="net.roseindia.web.LoginFormController">
    <property name="sessionForm"><value>false</value></property>
    <property name="commandName"><value>login</value></property>
    <property name="commandClass"><value>net.roseindia.web.Login</value></property>
    <property name="validator"><ref bean="loginValidator"></ref></property>     
    <property name="formView"><value>login</value></property>
    <property name="successView"><value>success</value></property>
</bean>      
<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
    <property name="paramName" value="hl"></property>
</bean>  
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"></bean>      

</beans>

There was a version problem.
On server it was 1.5 and application was built in 1.6
I install 1.6 and changed path in server.xml and whereever required.
I am getting different error.

trying to GET /UserLogin/login.html, service-j2ee reports: ApplicationDispatcher[/UserLogin] PWC1231: Servlet.service() for servlet jsp threw exception
java.lang.StackOverflowError
    at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
    at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
    at java.io.File.exists(File.java:733)
    at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:884)
    at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:244)
    at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:304)
    at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2064)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1946)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:946)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1382)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1636)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:152)
    at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:210)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:595)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:457)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:351)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
    at org.apache.catalina.core.Applicat
[21/Feb/2013:15:23:00] failure (15874): for host x.x.x.x trying to GET /UserLogin/login.html, service-j2ee reports: StandardWrapperValve[dispatcher]: PWC1406: Servlet.service() for servlet dispatcher threw exception
java.lang.StackOverflowError
    at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
    at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
    at java.io.File.exists(File.java:733)
    at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:884)
    at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:244)
    at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:304)
    at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2064)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1946)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:946)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:972)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1432)
    at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1382)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1636)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:152)
    at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:210)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:595)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:457)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:351)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
    at org.apache.catalina.core.A


   I am getting what is wrong.
This article has been dead for over six months. Start a new discussion instead.