AS 7.1.1 to EAP 6.1 Migration of OWF
ksutton Sep 27, 2013 4:47 PMI'm in the process of migrating a customized OWF application from JBoss AS 7.1.1 to JBoss EAP 6.1. I've copied over the war & the modules, and I've updated the configuration & start scripts as far as I can tell is needed. The issue seems to be that the resources imported by the Spring resources.xml, which exist under a particular JBoss module's path, are not loaded.
Here's the /WEB-INF/spring/resources.xml, which tries to import the OWF config files:
<?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-3.0.xsd"> <import resource="classpath*:*OWFsecurityContext*.xml" /> <import resource="classpath*:OwfConfig.xml" /> </beans>
Here's a clip from the log output from the working deployment in AS 7.1.1, showing that the first log statement after loading the resources.xml is the loading of the imported OWFsecurityContext_JBoss.xml file:
15:23:03,277 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-5) Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/resources.xml]
15:23:03,518 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-5) Loading XML bean definitions from file [/opt/jboss/default/modules/com/mycompany/owf/main/./OWFsecurityContext_JBoss.xml]
Here's a clip from the log output from the non-working deployment in EAP 6.1; the OWF resource import never happens afterwards:
15:19:28,424 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (ServerService Thread Pool -- 68) Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/resources.xml]
15:19:28,836 INFO [org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport] (ServerService Thread Pool -- 68) Set db generation strategy to 'none'
No exceptions or errors are reported until much later on, when this possibly-related exception is thrown:
15:19:33,738 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/owf]] (ServerService Thread Pool -- 68) JBWEB000284: Exception starting filter springSecurityFilterChain: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527) [org.springframework.context.support-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083) [org.springframework.context.support-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274) [org.springframework.context.support-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [org.springframework.context.support-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:266) [org.springframework.context.support-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [org.springframework.context.support-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:217) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:145) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:179) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:416) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3225) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3791) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [rt.jar:1.6.0_41]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_41]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_41]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_41]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_41]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_41]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
I've tried renaming the OWFsecurityContext_JBoss.xml file, to see if a resource-not-found error is generated, but none is. The file is located under /opt/jboss/default/modules/com/mycompany/owf/main. I'm wondering if the modules directory was part of the classpath in AS 7.1.1 but no longer is in EAP 6.1; or is there something else I'm missing?
Is there any way to print out what classpath is in effect at the point the Spring resources.xml file is loaded?
Thanks,
Kyle Sutton
UPDATE: Basically, the wildcards used on the right side of the import resource aren't supported directly by JBoss. They're supported through Snowdrop, and, as in this particular application's case (I'm guessing), Grails. Since my overall goal is to migrate & load test the app, and not to dig down into the configuration, I've just removed the wildcards and now the application works fine. The issue was probably that I didn't copy over some necessary Grails components or configuration from the AS 7.1.1 deployment, but I'm content to just get on with the load testing...