4 Replies Latest reply on Nov 25, 2013 4:15 PM by Guillaume Archambault

    How to import external resource in application.context.xml of JBoss AS7.1.1

    james viet Newbie

      Hi everyone,


      I have 1 file: shared.xml in /lib/app1.sar. shared.xml in META-INF of app1


      In app2, I would like to use shared.xml of app1 so: I configure in application.context.xml file


      <import resource="classpath:/META-INF/shared.xml" />



      I also config in jboss-deployment-structure.xml of app2


      <?xml version="1.0" encoding="UTF-8"?>




                              <module name="lib" />  <!--path to folder contains app1 -->





      But when I deploy app2, server throw error:


      Caused by: java.io.FileNotFoundException: class path resource [META-INF/shared.xml] cannot be opened because it does not exist

          at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)

          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)

          ... 36 more



      Could you please help me on this?


      Thanks very much.