4 Replies Latest reply on May 25, 2015 1:56 AM by Raj Kumar

    Error creating bean with name 'validatorFactory' defined in ServletContext resource in Wildfly 8.2?

    Raj Kumar Newbie

      Hi am migrating my spring application from jboss 6 to wildfly 8.2.

      And am migrating spring 2.3 to 4.1

      As i configured all the required jars as module in wildfly as per wildfly documentation.

      When i deploy my application in server am unable to load applicationContext-validation.xml

      Here is my server.log : ,

      2015-05-22 19:02:23,472 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 20754ms - Started 239 of 296 services (93 services are lazy, passive or on-demand)

      2015-05-22 19:02:28,481 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "CustomerAuthentication_JB60.war" (runtime-name: "CustomerAuthentication_JB60.war")

      2015-05-22 19:02:32,477 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.CustomerAuthentication_JB60.war" is using a private module ("org.apache.commons.io:main") which may be changed or removed in future versions without notice.

      2015-05-22 19:02:32,492 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.CustomerAuthentication_JB60.war" is using a private module ("org.apache.commons.io:main") which may be changed or removed in future versions without notice.

      2015-05-22 19:02:33,248 INFO  [io.undertow.servlet] (MSC service thread 1-1) Initializing Spring root WebApplicationContext

      2015-05-22 19:02:33,251 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Root WebApplicationContext: initialization started

      2015-05-22 19:02:33,358 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Refreshing Root WebApplicationContext: startup date [Fri May 22 19:02:33 IST 2015]; root of context hierarchy

      2015-05-22 19:02:33,452 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-1) Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-jdbc.xml]

      2015-05-22 19:02:33,749 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-1) Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-validation.xml]

      2015-05-22 19:02:33,776 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-1) Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]

      2015-05-22 19:02:35,209 INFO  [org.springframework.context.support.PropertySourcesPlaceholderConfigurer] (MSC service thread 1-1) Loading properties file from class path resource [jdbc.properties]

      2015-05-22 19:02:35,226 INFO  [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (MSC service thread 1-1) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring

      2015-05-22 19:02:37,105 INFO  [org.springmodules.validation.commons.DefaultValidatorFactory] (MSC service thread 1-1) Loading validation configurations from [ServletContext resource [/WEB-INF/validation.xml],ServletContext resource [/WEB-INF/validator-rules.xml]]

      2015-05-22 19:02:37,119 WARNING [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in ServletContext resource [/WEB-INF/applicationContext-validation.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

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

        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

      Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1510) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        ... 22 more

       

       

      2015-05-22 19:02:37,596 SEVERE [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in ServletContext resource [/WEB-INF/applicationContext-validation.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

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

        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

      Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1510) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

        ... 22 more

       

       

      2015-05-22 19:02:38,064 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

      Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in ServletContext resource [/WEB-INF/applicationContext-validation.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        ... 3 more

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in ServletContext resource [/WEB-INF/applicationContext-validation.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193)

        ... 7 more

      Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)

        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1510)

        ... 22 more

       

       

      2015-05-22 19:02:38,350 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "CustomerAuthentication_JB60.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./auth" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: Failed to start service

          Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in ServletContext resource [/WEB-INF/applicationContext-validation.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

          Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in ServletContext resource [/WEB-INF/applicationContext-validation.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule

          Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule"}}

      2015-05-22 19:02:38,682 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "CustomerAuthentication_JB60.war" (runtime-name : "CustomerAuthentication_JB60.war")

      2015-05-22 19:02:38,684 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: Failed to start service

      Here is my applicationContext-validation.xml:

      <?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-4.1.xsd">

       

       

          <bean id="validatorFactory" class="org.springmodules.validation.commons.DefaultValidatorFactory">

              <property name="validationConfigLocations">

                  <list>

                      <value>/WEB-INF/validation.xml</value>

                      <value>/WEB-INF/validator-rules.xml</value>

                  </list>

              </property>

          </bean>

      </beans>

      FYI : Am able to deploy the application without [/WEB-INF/applicationContext-validation.xml].file, as i removed this file and tried deploy.

      can any one please guide me the cause of this exception and issue.

      Thanks in advance.

        • 1. Re: Error creating bean with name 'validatorFactory' defined in ServletContext resource in Wildfly 8.2?
          Jay SenSharma Master
          PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationConfigLocations' threw exception;
          nested exception is java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
          
          
          

           

           

          Above error indicates that your application is internally dependent on "org.apache.commons.digester.Rule" class which is available as part of "commons-digester.jar" jar.  

           

          As you  mentioned that you have all the required jars as module in wildfly.  So can you please check if your module is including the JAR "commons-digester.jar"   Or if your module has any dependency to another module which has the "commons-digester.jar" jar ?

           

          You can download that jar from apache site:  Digester - Download Apache Commons Digester

          • 2. Re: Error creating bean with name 'validatorFactory' defined in ServletContext resource in Wildfly 8.2?
            Raj Kumar Newbie

            Hi Jay,

             

            i have added commons-digester-1.7.jar in WEB-INF/lib/commons-digester-1.7.jar,

             

            but still getting above exception,

             

            any other suggestion ?

            • 3. Re: Error creating bean with name 'validatorFactory' defined in ServletContext resource in Wildfly 8.2?
              Jay SenSharma Master

              Hello Raj,

               

                 Adding the JAR  WEB-INF/lib/commons-digester-1.7.jar,  inside the application will not help because from the stacktrace of the application it look like the frameworks which the application is using internally needs access to that JAR.   Static modules does not have visibility to the JARs which are added as part of deployments (dynamic modules). 

                 Hence as mentioned earlier it looks like you will need to either add that JAR inside your custom module or your custom module (like Spring) need to be dependent on some other custom module which includes that JAR "commons-digester-1.7.jar"  using <dependencies> tag in the module.xml.

              • 4. Re: Error creating bean with name 'validatorFactory' defined in ServletContext resource in Wildfly 8.2?
                Raj Kumar Newbie

                Hi Jay,

                 

                I've Added commons-digester-1.7.jar as Dependency in "org.springframework" Module

                please refer module.xml file here

                 

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

                <module xmlns="urn:jboss:module:1.3" name="org.springframework">

                  <resources>

                  <resource-root path="spring-aop-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-aspects-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-beans-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-context-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-context-support-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-core-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-expression-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-instrument-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-jdbc-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-jms-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-messaging-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-orm-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-oxm-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-test-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-tx-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-web-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-webmvc-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-webmvc-portlet-4.1.6.RELEASE.jar"/>

                  <resource-root path="spring-modules-jakarta-commons-0.8.jar"/>

                  <resource-root path="spring-modules-validation-0.8.jar"/>

                  <resource-root path="com.springsource.org.aopalliance-1.0.0.jar"/>

                  </resources>

                  <dependencies>

                  <module name="javax.api" services="import"/>

                  <module name="javax.transaction.api" services="import"/>

                  <module name="javaee.api" services="import"/>

                  <module name="org.apache.commons.logging" services="import"/>

                  <module name="org.apache.commons.validator" services="import"/>

                  <module name="org.jboss.vfs" services="import"/>

                  <module name="org.jboss.msc" services="import"/>

                  <module name="javax.el.api" services="import" export="true"/>

                  <module name="com.sun.xml.bind" services="import" export="true"/>

                  <module name="org.aopalliance" services="import" export="true"/>

                  <module name="org.aspectj" services="import" export="true"/>

                  <module name="org.apache.velocity" services="import" export="true"/>

                  <module name="org.apache.commons.fileupload" services="import" export="true"/>

                  <module name="javax.servlet.jstl.api" services="import" export="true"/>

                  <module name="org.apache.commons.configuration" services="import" export="true"/>

                  <module name="org.apache.commons.digester" services="import" export="true"/>    <-- this is commons-digester-1.7.jar dependency module

                  </dependencies>

                  </module>

                 

                am i missing anything else ?