I need one help. i am trying to create a Spring moven project in multiple module. just assume, there is Maven project with below module: Module-root(parent Module of all submodule) Module-persistance(Having code logic for DAO operation and package type jar) Module-service(Having code logic for controller implementation and package type war)
Module-service is dependent on Module-persistance submodule. Module-persistance is having Spring-context1.xml file in it's src/main/resources classpath. Module-service is having spring-context2.xml file in it's src/main/resources classpath.
So, My question is how spring-context2.xml can import Spring-context1.xml? Thanks in Advance!
Now importing of the spring.xml file from one module to another working fine :).
But but here i am getting error while deploying the war.
HibernateCfg.java is a file defined in module Module-persistance. and imported this file in the Module-service. compile and build of the all module is successful. but at the time of deploying the Module-service war file on the server, it is throwing ClassNotFoundException for "HibernateCfg".
I checked the war file, inside of that Module-persistance.jar file is available with class file of HibernateCfg. but i am not sure why it is throwing exception. Could you please help me with this. Below is the exception:
Caused by: java.lang.ClassNotFoundException: org.munsiji.hibernateUtil.HibernateCfg from [Module "deployment.munsiji-service.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) ... 48 more