5 Replies Latest reply on Oct 2, 2012 9:39 PM by James Livingston

    META-INF accessibility within WAR

    Ben Farr Newbie

      I am migrating a spring batch project in a war from Jboss 4 to Jboss 7 and am not sure of how to best get around the issue of overriding defaults for spring batch.

       

      in web.xml

      ...

      <context-param>

        <param-name>contextConfigLocation</param-name>

        <param-value>classpath*:/org/springframework/batch/admin/web/resources/webapp-config.xml</param-value>

      </context-param>

      .....

      <servlet>

        <servlet-name>Batch Servlet</servlet-name>

        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

        <init-param>

         <param-name>contextConfigLocation</param-name>

         <param-value>classpath*:/org/springframework/batch/admin/web/resources/servlet-config.xml</param-value>

        </init-param>

        <load-on-startup>1</load-on-startup>

      </servlet>

       

      These live in spring-batch-admin-manager-1.2.1.RELEASE.jar and spring-batch-admin-resources-1.2.1.RELEASE.jar within the WEB-INF/lib

       

      as suggested by spring batch, the override of the datasource is in  META-INF/spring/batch/override/datasource-context.xml

      which lives in META-INF within the war

       

      However it doesnt pick up this override and is erroring on loading the context Could not resolve placeholder 'batch.jdbc.driver' which doesnt happen in Jboss 4/jdk1.5.

       

      I think the issue is the visibility of META-INF directories across jars and WEB-INF/classes.

       

      Has anyone had to deal with something like this. I saw the manifest allows for services option but appears its only for META-INF/services directory ?