1 Reply Latest reply on Oct 13, 2014 8:56 AM by bmajsak

    Unable to load applicationContext.xml in cross module project while implementing Arquillian

    ap_123

      I am facing one issue while implementing Arquillian,I already put the same question on stackoverflow but haven't receive any input

       

      http://stackoverflow.com/questions/25361428/how-to-read-applicationcontext-in-cross-module

       

       

      I am implementing arquillian in my project, I am facing one issue while calling application-context, have 2 modules A and B, A have 1 context file and B have 2, context-file of module A is main application-context for my project.

      I am writing junit of module B and trying to use context-file of A so it import other dependent context file but every time it throws an error "applicationContext.xml] cannot be opened because it does not exist" anyone please let me know how can I use context File in cross module or more than one context file with @SpringClientConfiguration

       

       

      @RunWith(Arquillian.class)

      @SpringClientConfiguration("process/src/test/resources/applicationContext.xml")

       

      public class ArquillianTest {

      @Inject InMemoryDB inMemoryDB;

      @Autowired
      private BeanInitialization beanInz;
      @Deployment

      public static WebArchive create()
        
      {
        
      WebArchive ar = null;
        
      try {
          ar
      = ShrinkWrap
        
      .create(WebArchive.class, "inMemory.war")
        
      .addClasses(InMemoryDB.class, ArquillianTest.class)
        
      .addAsWebInfResource("process/applicationContext.xml")
        
      .addAsWebInfResource("process/applicationContext-shopping-standalone.xml")
        
      .addAsWebInfResource(process/applicationContext-shopping.xml");
        } catch (Exception e) {
        e.printStackTrace();
        }
        return ar;

        }

       

      Please  anyone give me some hint,So I can proceed furthur