3 Replies Latest reply on Sep 23, 2013 5:04 PM by jowilson

    I got a exception while deploying spring mvc in jboss as 7.1.1final

    thiruroyal

      I got this excepion.

       

      ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-13) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/TBComGUI-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exclusionAccountsController' defined in ServletContext resource [/WEB-INF/TBComGUI-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver] to required type [org.springframework.web.servlet.mvc.multiaction.MethodNameResolver] for property 'methodNameResolver'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver] to required type [org.springframework.web.servlet.mvc.multiaction.MethodNameResolver] for property 'methodNameResolver': no matching editors or conversion strategy found

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) [spring-2.5.jar:2.5]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485) [spring-2.5.jar:2.5]

          at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) [spring-2.5.jar:2.5]

          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) [spring-2.5.jar:2.5]

          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169) [spring-2.5.jar:2.5]

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) [spring-2.5.jar:2.5]

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170) [spring-2.5.jar:2.5]

        

       

      Please give me a clue to remove this error.

        • 1. Re: I got a exception while deploying spring mvc in jboss as 7.1.1final
          jowilson

          Which version of Snowdrop are you using?

           

          Which version of Spring are you trying to use?

          • 2. Re: I got a exception while deploying spring mvc in jboss as 7.1.1final
            thiruroyal

            Thanks for your response.

            I'm using Spring 2.5  and Snowdrop 2.1.0

             

            I have included spring jars(spring2.5jar, spring-webmvc-2.5.5.jar) in to tbcom.war\WEB-INF\lib directory.

            And in jboss-deployment-structure.xml, excluded  org.jboss.snowdrop module. below is the structure of my jboss-deployment-structure.xml.

             

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

            <jboss-deployment-structure>

              <deployment>

                <dependencies>

                <module name="com.sysBE"/>

                <module name="com.sqlserver"/>

                <module name="org.apache.commons.collections"/>

                <module name="org.apache.commons.pool"/>

                <module name="org.dom4j"/>

                <module name="org.hibernate_3"/>   

                </dependencies>

                <exclusions>

                    <module name="org.jboss.snowdrop" />

                </exclusions>

              </deployment>  

            </jboss-deployment-structure>

             

            Still I'm getting same problem.

            • 3. Re: I got a exception while deploying spring mvc in jboss as 7.1.1final
              jowilson

              You are welcome to include your copies of the Spring jars in your application, however you can also add one of the provided modules to your instance of JBoss.  This has the benefit of keeping your .war smaller and allowing all applications to share a common set libraries.  It really depends on your situation as to which option is better.  That said, I would advise if you able to, use the module instead of including the jars. You can download the modules here. You can also build it from source, there is an install option that will put the files where they belong.

               

              It is also worth noting that deployments can also be configured to exclude specific implicit dependencies. This is done with the **jboss-deployment-structure.xml** deployment descriptor file. This is commonly done when an application bundles a specific version of a library that the application server will attempt to add as an implicit dependency.  If you use the configuration you listed above, I believe you will be excluding Snowdrop not including it.

               

              There are updates to the version of Snowdrop that you are using.  If you are able please update.  The latest at this time is 3.0.1.Final.  You can download it here.

               

              There is also a working example called Sportsclub that may help you to see how to use Snowdrop. 

               

              Once you have done this, if you choose to do any of it, please provide a complete stack trace.

               

              Joshua