We have to create an EAR file that should have two WAR files. But these two WAR files share common application libraries. The two WAR files are build and added to EAR. When this EAR is deployed, the common classes are loaded twice resulting in duplicate spring beans, spring schedulers.

How can these common libraries be loaded only once? should they be removed from one WAR file? What should be the EAR structure.

Thanks in adv