1

I have an application which is using spring data mongo and I am trying to deploy it on Wildfly 8. No matter what I do, I always end up with the following exception:

[org.jboss.msc.service.fail] (MSC service thread 1-11) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default- org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./....: Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: class org.springframework.data.mongodb.repository.config.MongoRepositoriesRegistrar is not assignable to interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:216)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
    ... 3 more
Caused by: java.lang.IllegalArgumentException: class org.springframework.data.mongodb.repository.config.MongoRepositoriesRegistrar is not assignable to interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
    at org.springframework.util.Assert.isAssignable(Assert.java:369)
    at org.springframework.util.Assert.isAssignable(Assert.java:352)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:129)
    at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:419)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:248)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:205)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:173)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:155)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:299)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:187)
    ... 7 more

I tried to solve this by setting

bean-discovery-mode="none"

in the beans.xml file. One other thing I tried was to disable weld from the server (commented out all the occurrences from profile and extensions in the standalone.xml configuration file).

This application has been previously deployed on Glassfish 4 and worked ok.

Please let me know if you have any solutions for this.

Thanks!

Atul
  • 1,536
  • 3
  • 21
  • 37
  • Is this related to https://issues.jboss.org/browse/WFLY-682 ? There seems to a related issue if your Wildfly is one of the Alpha 8.0.0 versions - http://stackoverflow.com/questions/19365914/deploy-error-of-spring-application-on-wildfly-8-0-0-beta-1?rq=1 – eoinbrazil Apr 03 '14 at 14:59
  • This is not related in any way to some faces issue. This is a problem with mongoDb. I am using wildfly-8.0.0.Final – user1919204 Apr 03 '14 at 15:18
  • A little more detail would help understanding your problem. What stack are you using, what operating system, what's your war's structure, what's the content of your web.xml file, what jars are in your classpath ? This would give better context to your problem and improve the chances that it can be answered. – eoinbrazil Apr 03 '14 at 15:53
  • Maybe can you provide snippet to reproduce it? – Krzysztof Miksa Apr 06 '14 at 11:58

0 Answers0