[英]Waffle as a module in Jboss 7.1
我們正在嘗試從tomcat遷移到Jboss AS 7.1,但是我們用於SSO的Waffle庫存在問題。
我們讀到為了在jboss AS 7.1中使用Waffle,我們需要在Jboss中創建一個具有以下依賴關系的模塊:
<module xmlns="urn:jboss:module:1.1" name="com.sso">
<resources>
<resource-root path="Waffle-1.4.jar"/>
<resource-root path="platform-gcp_1.jar"/>
<resource-root path="jna-gcp_1.jar"/>
<resource-root path="guava-r07-gcp_1.jar"/>
<resource-root path="commons-logging-1.1.1.jar"/>
</resources>
<dependencies>
<module name="javax.servlet.api" />
</dependencies>
</module>
並將以下依賴項添加到我們的jboss-deployment-structure.xml中:
<dependencies>
<module name="org.jboss.ironjacamar.jdbcadapters"/>
<module name="com.sso" export="TRUE" />
</dependencies>
但似乎jboss並未在模塊中找到所有類,因為我們收到以下錯誤:
Caused by: java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilt
erEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader]
非常感謝您的幫助。
更新:
這是整個例外:
18:26:04,936嚴重[org.springframework.web.context.ContextLoader](MSC服務線程1-2)上下文初始化失敗:org.springframework.beans.factory.BeanCreationException:創建名稱為'_filterChainProxy'的bean時出錯:豆失敗; 嵌套的異常是org.springframework.beans.factory.BeanCreationException:創建名稱為'_filterChainList'的bean時出錯:使用鍵[2]設置bean屬性'filters'時無法解析對bean'_exceptionTranslationFilter'的引用; 嵌套的異常是org.springframework.beans.factory.BeanCreationException:創建名稱為'_exceptionTranslationFilter'的bean時出錯:初始化bean失敗; 嵌套異常是org.springframework.beans.factory.CannotLoadBeanClassException:找不到在類路徑資源[waffle-filter.xml]中定義的名稱為'negotiateSecurityFilterEntryPoint'的bean的類[waffle.spring.NegotiateSecurityFilterEntryPoint]; 嵌套的異常是java.lang.ClassNotFoundException:waffle.spring.NegotiateSecurityFilterEntryPoint來自org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBean(AbstractAutowireCapableBeanFactory.java: 480)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run(AbstractAutowireCapableBeanFactory.java:409)[spring-2.5.5.jar:2.5.5]在java.security.AccessController.doPrivileged(本機方法)[rt.jar:1.7.0_13]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)[spring-2.5.5.jar :2.5.5]在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:264)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support .DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)[春天2.5.5 .jar:2.5.5]位於org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)[spring-2.5.5.jar:2.5.5]位於org.springframework.beans.factory。 support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)[spring-2.5 .5.jar:2.5.5]位於org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)[spring-2.5.5.jar:2.5.5]位於org.springframework.context。 support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)[spring-2.5.5.jar:2.5.5]在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)[spring-2.5.5 .jar:2.5.5],位於org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)[spring-2.5.5.jar:2.5.5],位於org.springframewor k.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)[spring-2.5.5.jar:2.5.5]在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)[spring -2.5.5.jar:2.5.5]在org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)[jbossweb-7.0.13.Final.jar:]在org.apache.catalina.core .StandardContext.start(StandardContext.java:3850)[jbossweb-7.0.13.Final.jar:]位於org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)[jboss-as-web -7.1.1.Final.jar:7.1.1.Final],位於org.jboss.msc.service.ServiceControllerImpl $ StartTask.run,位於org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1811) (ServiceControllerImpl.java:1746)在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[rt.jar:1.7.0_13]在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java: 615)[rt.jar:1.7.0_13]在Java。 lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_13]原因:org.springframework.beans.factory.BeanCreationException:創建名稱為'_filterChainList'的bean時出錯:無法解析對bean'_exceptionTranslationFilter的引用',同時使用鍵[2]設置bean屬性“ filters”; 嵌套的異常是org.springframework.beans.factory.BeanCreationException:創建名稱為'_exceptionTranslationFilter'的bean時出錯:初始化bean失敗; 嵌套異常是org.springframework.beans.factory.CannotLoadBeanClassException:找不到在類路徑資源[waffle-filter.xml]中定義的名稱為'negotiateSecurityFilterEntryPoint'的bean的類[waffle.spring.NegotiateSecurityFilterEntryPoint]; 嵌套的異常是java.lang.ClassNotFoundException:waffle.spring.NegotiateSecurityFilterEntryPoint來自org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java: 275)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factors.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.org.org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)[spring-2.5.5.jar:2.5.5] java:126)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)[spring-2.5.5.jar:2.5.5 ]在org.springframework.beans.fac tory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)[spring -2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run(AbstractAutowireCapableBeanFactory.java:409)[spring-2.5.5.jar:2.5.5]在java.security .AccessController.doPrivileged(本機方法)[rt.jar:1.7.0_13]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)[spring-2.5.5.jar:2.5.5 ]在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:264)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:221)[spring-2.5.5.jar:2.5.5]在org.springframework.be ans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) org.org上的[spring-2.5.5.jar:2.5.5],org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)org上的[spring-2.5.5.jar:2.5.5]。 springframework.security.config.FilterChainProxyPostProcessor.postProcessBeforeInitialization(FilterChainProxyPostProcessor.java:52)[spring-security-core-2.0.7.RELEASE.jar:]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBean) :350)[spring-2.5.5.jar:2.5.5],位於org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(Abst ractAutowireCapableBeanFactory.java:473)[spring-2.5.5.jar:2.5.5] ... 22更多原因:org.springframework.beans.factory.BeanCreationException:創建名稱為“ _exceptionTranslationFilter”的bean時出錯:bean的初始化失敗; 嵌套異常是org.springframework.beans.factory.CannotLoadBeanClassException:找不到在類路徑資源[waffle-filter.xml]中定義的名稱為'negotiateSecurityFilterEntryPoint'的bean的類[waffle.spring.NegotiateSecurityFilterEntryPoint]; 嵌套的異常是java.lang.ClassNotFoundException:waffle.spring.NegotiateSecurityFilterEntryPoint來自org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBean(AbstractAutowireCapableBeanFactory.java: 480)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run(AbstractAutowireCapableBeanFactory.java:409)[spring-2.5.5.jar:2.5.5]在java.security.AccessController.doPrivileged(本機方法)[rt.jar:1.7.0_13]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)[spring-2.5.5.jar :2.5.5]在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:264)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support .DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)[春天2.5.5 .jar:2.5.5]位於org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)[spring-2.5.5.jar:2.5.5]位於org.springframework.beans.factory。 support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)[spring-2.5 .5.jar:2.5.5],位於org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)[spring-2.5.5.jar:2.5.5] ... 40更多原因:org.springframework.beans.factory.CannotLoadBeanClassException:找不到在類路徑資源[waffle-filter.xml]中定義的名稱為'negotiateSecurityFilterEntryPoint'的bean的類[waffle.spring.NegotiateSecurityFilterEntryPoint]; 嵌套的異常是java.lang.ClassNotFoundException:來自org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:[服務模塊加載程序的模塊“ deployment.Grc.war:main”的waffle.spring.NegotiateSecurityFilterEntryPoint] 1138)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1102)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run(AbstractAutowireCapableBeanFactory.java:386)[spring-2.5.5.jar:2.5.5] at java.security.AccessController.doPrivileged(Native Method)[rt.jar :1.7.0_13],位於org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)[spring-2.5.5.jar:2.5.5],位於org.springframework.beans.factory.support。 org.springframework.bea上的AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:264)[spring-2.5.5.jar:2.5.5] ns.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)[spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) org.org上的[spring-2.5.5.jar:2.5.5],org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)org上的[spring-2.5.5.jar:2.5.5]。 springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)[spring-2.5.5.jar:2.5.5]位於org.springframework.security.config.EntryPointInjectionBeanPostProcessor.postProcessBeforeInitialization(EntryPointInjectionBeanPostProcessor.java:37) [spring-security-core-2.0.7.RELEASE.jar:]位於org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abst ractAutowireCapableBeanFactory.java:1330)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)[spring-2.5.5.jar:2.5 .5] ...還有49個原因:java.lang.ClassNotFoundException:waffle.spring.NegotiateSecurityFilterEntryPoint來自org.jboss.modules.ModuleClassLoader.findClass(來自Service Module Loader的[Module“ deployment.Grc.war:main” from] org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)的ModuleClassLoader.java:190)org.jboss.modules.ConcurrentClassLoader的org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) (ConcurrentClassLoader.java:398)在org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)在org.springframework.util.ClassUtils.forName(ClassUtils.java:242)[spring-2.5.5.jar: 2.5.5],網址為org.springframework.beans.factory.support.Abstra ctBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:383)[spring-2.5.5.jar:2.5.5]在org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1135)[spring-2.5.5 .jar:2.5.5] ...另外62
最后,事實證明,無需對配置進行任何更改,這是一個愚蠢的錯誤,JBoss計算機必須屬於域才能使Waffle正常工作。
不管怎么說,還是要謝謝你。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.