This is an issue with JBoss Modules: https://issues.jboss.org/browse/AS7-1928
The namespace configuration files are in META-INF, but that directory is not visible (nor is it configurable via jboss-deployment-structure.xml)
Actually, it seems like jboss-deployment-structure.xml supports this already. Therefore, instead of using MANIFEST.MF, you may add this in /WEB-INF/jboss-deployment-structure.xml (this is assuming that you have a web application - otherwise it's /META-INF/jboss-deployment-structure.xml):
<module name="org.springframework" >
Thanks!!! It really works with jboss-deployment-structure.xml, but another trouble with Spring has been surfaced:
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141) [org.springframework.beans-3.0.6.RELEASE.jar:]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74) [org.springframework.beans-3.0.6.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958) [org.springframework.beans-3.0.6.RELEASE.jar:]
... 69 more
I made the following configuration in jboss-deployment-structure.xml:
<module name="org.apache.commons.logging" />
<module name="org.apache.log4j" />
<module name="org.hibernate" />
<module name="org.jdom" />
<include path="META-INF**" />
<include path="org**" />
It seems spring doesn't see hibernate.jar, but it is deployed as a module in jboss 7 by default(I changed default Hibernate 4 to 3.6.7)
As this is a modified version of AS7, I can't really say what went wrong, but an alternative solution that worked better would be to package hibernate inside the application, and exclude the hibernate module (might not be necessary, if this is a native Hibernate application).
Did yoyu ever figure out what the problem is? Facing the same issue here...
What issue? spring doesn't see hibernate? You should use the latest Spring version(with 3.2 it works well on my side) or place hibernate jars within war
We're using Spring 2.5.6.SEC03 with Snowdrop 2.0.4 and we're not defining any Hibernate dependency (i.e. Hibernate 4 would be used). It seems to be working when packaging Snowdrop and the Sping libs into the EAR however, when trying to use the JBoss deployment descriptor and defining the modules get the error above.
Are you using the Snowdrop module? Do you have a dependency on the Spring module in your Snowdrop module.xml? How does your Spring module.xml look like? Is there a spring-orm dependency and a dependency on Hibernate? The issue might be that Spring 2.5.6.SEC03 can't wrap Hibernate 4, however why is it working when placing the Spring libs into the EAR?
Thanks for your help.