Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17921

Add missing org.jboss.vfs to RESTEasy Spring deployments

XMLWordPrintable

    • Hide

      This can be worked around by adding a dependency to the org.jboss.vfs in a jboss-deployment-structure.xml. Please note this is only a workaround and should not be considered a fix. The org.jboss.vfs module is private and is not meant for use in deployments.

      Including a VFS dependency in your deployment will fail to locate your Spring configuration files.

      NOT MEANT FOR A FINAL FIX

      jboss-deployment-structure.xml
      <?xml version="1.0"?>
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"
                                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <deployment>
              <exclusions>
                  <module name="org.jboss.resteasy.resteasy-cdi"/>
              </exclusions>
              <dependencies>
                  <module name="org.jboss.vfs"/>
              </dependencies>
          </deployment>
      </jboss-deployment-structure>
      
      Show
      This can be worked around by adding a dependency to the org.jboss.vfs in a jboss-deployment-structure.xml . Please note this is only a workaround and should not be considered a fix. The org.jboss.vfs module is private and is not meant for use in deployments. Including a VFS dependency in your deployment will fail to locate your Spring configuration files. NOT MEANT FOR A FINAL FIX jboss-deployment-structure.xml <?xml version= "1.0" ?> <jboss-deployment-structure xmlns= "urn:jboss:deployment-structure:1.2" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > <deployment> <exclusions> <module name= "org.jboss.resteasy.resteasy-cdi" /> </exclusions> <dependencies> <module name= "org.jboss.vfs" /> </dependencies> </deployment> </jboss-deployment-structure>
    • ---
    • ---

      The resteasy-spring test suite is failing with WildFly 28. This seems to due to WFCORE-6250 removing the org.jboss.vfs module from deployments. Spring seems to require VFS when looking for configuration resources. If not found a CNFE is thrown in the org.springframework.core.io.VfsUtils utility.

      Example Stack Trace From Test
      13:36:58,771 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /ContactsDependenciesInDeploymentTest/contacts/data: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/springmvc-servlet.xml]
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:417)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:338)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:184)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:220)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:191)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:672)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:706)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:720)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:595)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:537)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:169)
      	at jakarta.servlet.api@6.0.0//jakarta.servlet.GenericServlet.init(GenericServlet.java:178)
      	at jakarta.servlet.api@6.0.0//jakarta.servlet.http.HttpServlet.init(HttpServlet.java:107)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
      	at org.wildfly.security.elytron-web.undertow-server-servlet@3.0.1.Final//org.wildfly.elytron.web.undertow.server.servlet.RunAsLifecycleInterceptor.doIt(RunAsLifecycleInterceptor.java:70)
      	at org.wildfly.security.elytron-web.undertow-server-servlet@3.0.1.Final//org.wildfly.elytron.web.undertow.server.servlet.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:76)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:304)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.core.ManagedServlet.forceInit(ManagedServlet.java:207)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletChain.forceInit(ServletChain.java:130)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:63)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at org.wildfly.security.elytron-web.undertow-server@3.0.1.Final//org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.lambda$handleRequest$1(ElytronRunAsHandler.java:68)
      	at org.wildfly.security.elytron-base@2.1.0.Final//org.wildfly.security.auth.server.FlexibleIdentityAssociation.runAsFunctionEx(FlexibleIdentityAssociation.java:103)
      	at org.wildfly.security.elytron-base@2.1.0.Final//org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:161)
      	at org.wildfly.security.elytron-base@2.1.0.Final//org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:73)
      	at org.wildfly.security.elytron-web.undertow-server@3.0.1.Final//org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.handleRequest(ElytronRunAsHandler.java:67)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.core@2.3.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.core@2.3.5.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.core@2.3.5.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at org.wildfly.security.elytron-web.undertow-server-servlet@3.0.1.Final//org.wildfly.elytron.web.undertow.server.servlet.CleanUpHandler.handleRequest(CleanUpHandler.java:38)
      	at io.undertow.core@2.3.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow@28.0.0.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.core@2.3.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow@28.0.0.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
      	at io.undertow.core@2.3.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:276)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:132)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at org.wildfly.extension.undertow@28.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1430)
      	at org.wildfly.extension.undertow@28.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1430)
      	at org.wildfly.extension.undertow@28.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1430)
      	at org.wildfly.extension.undertow@28.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1430)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:256)
      	at io.undertow.servlet@2.3.5.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:101)
      	at io.undertow.core@2.3.5.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
      	at io.undertow.core@2.3.5.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
      	at org.jboss.xnio@3.8.9.Final//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.ExceptionInInitializerError
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.core.io.support.PathMatchingResourcePatternResolver$VfsResourceMatchingDelegate.findMatchingResources(PathMatchingResourcePatternResolver.java:922)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:570)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:329)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1408)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:422)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:317)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:276)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:90)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1390)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1370)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:178)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:149)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:96)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:511)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
      	... 65 more
      Caused by: java.lang.IllegalStateException: Could not detect JBoss VFS infrastructure
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:96)
      	... 81 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.vfs.VFS from [Module "deployment.ContactsDependenciesInDeploymentTest.war" from Service Module Loader]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
      	at deployment.ContactsDependenciesInDeploymentTest.war//org.springframework.core.io.VfsUtils.<clinit>(VfsUtils.java:73)
      	... 81 more
      

              jperkins-rhn James Perkins
              jperkins-rhn James Perkins
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: