Question

We are trying to migrate from tomcat to Jboss AS 7.1, but we have a problem with Waffle library we use for SSO.

we read that in order to use Waffle in jboss AS 7.1 we needed to create a module in Jboss with the following dependencies:

<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>

and added the following dependencies to our jboss-deployment-structure.xml:

<dependencies>
   <module name="org.jboss.ironjacamar.jdbcadapters"/>
   <module name="com.sso"  export="TRUE" />
</dependencies>

but it seems like jboss is not finding all the classes inside the module because we are getting the following error:

Caused by: java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilt
erEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader]

Thanks a lot for the help.

UPDATE:

This is the whole exception:

18:26:04,936 SEVERE [org.springframework.web.context.ContextLoader] (MSC service thread 1-2) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainProxy': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainList': Cannot resolve reference to bean '_exceptionTranslationFilter' while setting bean property 'filters' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_exceptionTranslationFilter': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [waffle.spring.NegotiateSecurityFilterEntryPoint] for bean with name 'negotiateSecurityFilterEntryPoint' defined in class path resource [waffle-filter.xml]; nested exception is java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilterEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(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] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_13] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.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) [spring-2.5.5.jar:2.5.5] at 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] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-2.5.5.jar:2.5.5] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) [spring-2.5.5.jar:2.5.5] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) [spring-2.5.5.jar:2.5.5] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [spring-2.5.5.jar:2.5.5] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [spring-2.5.5.jar:2.5.5] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-2.5.5.jar:2.5.5] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainList': Cannot resolve reference to bean '_exceptionTranslationFilter' while setting bean property 'filters' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_exceptionTranslationFilter': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [waffle.spring.NegotiateSecurityFilterEntryPoint] for bean with name 'negotiateSecurityFilterEntryPoint' defined in class path resource [waffle-filter.xml]; nested exception is java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilterEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader] at 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.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.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] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-2.5.5.jar:2.5.5] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_13] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.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) [spring-2.5.5.jar:2.5.5] at 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] at org.springframework.security.config.FilterChainProxyPostProcessor.postProcessBeforeInitialization(FilterChainProxyPostProcessor.java:52) [spring-security-core-2.0.7.RELEASE.jar:] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-2.5.5.jar:2.5.5] ... 22 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_exceptionTranslationFilter': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [waffle.spring.NegotiateSecurityFilterEntryPoint] for bean with name 'negotiateSecurityFilterEntryPoint' defined in class path resource [waffle-filter.xml]; nested exception is java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilterEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(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] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_13] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.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) [spring-2.5.5.jar:2.5.5] at 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] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) [spring-2.5.5.jar:2.5.5] ... 40 more Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [waffle.spring.NegotiateSecurityFilterEntryPoint] for bean with name 'negotiateSecurityFilterEntryPoint' defined in class path resource [waffle-filter.xml]; nested exception is java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilterEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java: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] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.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) [spring-2.5.5.jar:2.5.5] at 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] at org.springframework.security.config.EntryPointInjectionBeanPostProcessor.postProcessBeforeInitialization(EntryPointInjectionBeanPostProcessor.java:37) [spring-security-core-2.0.7.RELEASE.jar:] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-2.5.5.jar:2.5.5] ... 49 more Caused by: java.lang.ClassNotFoundException: waffle.spring.NegotiateSecurityFilterEntryPoint from [Module "deployment.Grc.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at org.springframework.util.ClassUtils.forName(ClassUtils.java:242) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:383) [spring-2.5.5.jar:2.5.5] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1135) [spring-2.5.5.jar:2.5.5] ... 62 more

Was it helpful?

Solution

In the end, it turns out there was no need to make any change to the configuration, it was a dumb error, the JBoss machine must belong to the domain for Waffle to work.

Thanks anyway.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top